diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-15 02:34:12 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-15 02:34:12 +0000 |
commit | 4e3ccc0505a59effce209f47a89cd6f5950884b7 (patch) | |
tree | cfc1217a9dec3f8cae240175e715f3c17ef3da54 /llvm/test/CodeGen | |
parent | 9fbf33d70f389af217459cec27f789b1b1480271 (diff) | |
download | bcm5719-llvm-4e3ccc0505a59effce209f47a89cd6f5950884b7.tar.gz bcm5719-llvm-4e3ccc0505a59effce209f47a89cd6f5950884b7.zip |
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.
llvm-svn: 213038
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/win_cst_pool.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/win_cst_pool.ll b/llvm/test/CodeGen/X86/win_cst_pool.ll index 7bc046d94e9..e8b853a03da 100644 --- a/llvm/test/CodeGen/X86/win_cst_pool.ll +++ b/llvm/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 +} |