diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2012-08-30 23:58:52 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2012-08-30 23:58:52 +0000 |
| commit | 5dd9e214fb92847e947f9edab170f9b4e52b908f (patch) | |
| tree | 61138a0bf58825b556d8f05d7f4b3bf354178227 /test | |
| parent | 9e3b6dfc2f4c10de4cd8f509b12769c6870aa805 (diff) | |
| download | external_llvm-5dd9e214fb92847e947f9edab170f9b4e52b908f.zip external_llvm-5dd9e214fb92847e947f9edab170f9b4e52b908f.tar.gz external_llvm-5dd9e214fb92847e947f9edab170f9b4e52b908f.tar.bz2 | |
Take account of boolean vector contents when promoting a build vector from i1 to some other type. rdar://problem/12210060
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
| -rw-r--r-- | test/CodeGen/X86/vec_select.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_select.ll b/test/CodeGen/X86/vec_select.ll new file mode 100644 index 0000000..065232c --- /dev/null +++ b/test/CodeGen/X86/vec_select.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -march=x86 | FileCheck %s + +; When legalizing the v4i1 constant, we need to consider the boolean contents +; For x86 a boolean vector constant is all ones so the constants in memory +; will be ~0U not 1. + +; CHECK: .long 4294967295 +; CHECK: .long 4294967295 +; CHECK: .long 0 +; CHECK: .long 0 + +; CHECK: test +define <4 x i8> @test(<4 x i8> %a, <4 x i8> %b) { + %sel = select <4 x i1> <i1 true, i1 true, i1 false, i1 false>, <4 x i8> %a, <4 x i8> %b + ret <4 x i8> %sel +} |
