summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/win_cst_pool.ll
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-07-15 02:34:12 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-07-15 02:34:12 +0000
commitcdc1044944cded7cf9236c25e0f5bf36624061eb (patch)
tree18a4df681a04ad2e5abf5b3d557d737da0628569 /test/CodeGen/X86/win_cst_pool.ll
parent3c0737454d1dac387d4aed46afaa0827095120b5 (diff)
CodeGen: Handle ConstantVector and undef in WinCOFF constant pools
The constant pool entry code for WinCOFF assumed that vector constants would be formed using ConstantDataVector, it did not expect to see a ConstantVector. Furthermore, it did not expect undef as one of the elements of the vector. ConstantVectors should be handled like ConstantDataVectors, treat Undef as zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/win_cst_pool.ll')
-rw-r--r--test/CodeGen/X86/win_cst_pool.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/win_cst_pool.ll b/test/CodeGen/X86/win_cst_pool.ll
index 7bc046d94e9..e8b853a03da 100644
--- a/test/CodeGen/X86/win_cst_pool.ll
+++ b/test/CodeGen/X86/win_cst_pool.ll
@@ -47,3 +47,20 @@ define <8 x i16> @vec2() {
; CHECK: vec2:
; CHECK: movaps __xmm@00000001000200030004000500060007(%rip), %xmm0
; CHECK-NEXT: ret
+
+
+define <4 x float> @undef1() {
+ ret <4 x float> <float 1.0, float 1.0, float undef, float undef>
+
+; CHECK: .globl __xmm@00000000000000003f8000003f800000
+; CHECK-NEXT: .section .rdata,"rd",discard,__xmm@00000000000000003f8000003f800000
+; CHECK-NEXT: .align 16
+; CHECK-NEXT: __xmm@00000000000000003f8000003f800000:
+; CHECK-NEXT: .long 1065353216 # float 1
+; CHECK-NEXT: .long 1065353216 # float 1
+; CHECK-NEXT: .zero 4
+; CHECK-NEXT: .zero 4
+; CHECK: undef1:
+; CHECK: movaps __xmm@00000000000000003f8000003f800000(%rip), %xmm0
+; CHECK-NEXT: ret
+}