diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-10-21 11:42:07 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-10-21 11:42:07 +0000 |
commit | 4bd222ae26d0411d5c67fd0ab5c043422b5f201b (patch) | |
tree | f97c10cbbfecfaaa770c9b093eb60a1b33ae9748 /test/CodeGen/X86/2011-10-21-widen-cmp.ll | |
parent | 58fba239e472b322633447482013aeae599d56be (diff) | |
download | external_llvm-4bd222ae26d0411d5c67fd0ab5c043422b5f201b.zip external_llvm-4bd222ae26d0411d5c67fd0ab5c043422b5f201b.tar.gz external_llvm-4bd222ae26d0411d5c67fd0ab5c043422b5f201b.tar.bz2 |
1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type.
2. Fix a typo in CONCAT_VECTORS which exposed the bug in #1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2011-10-21-widen-cmp.ll')
-rw-r--r-- | test/CodeGen/X86/2011-10-21-widen-cmp.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2011-10-21-widen-cmp.ll b/test/CodeGen/X86/2011-10-21-widen-cmp.ll new file mode 100644 index 0000000..aa1a600 --- /dev/null +++ b/test/CodeGen/X86/2011-10-21-widen-cmp.ll @@ -0,0 +1,30 @@ +; RUN: llc < %s -march=x86-64 -mcpu=corei7 | FileCheck %s + +target triple = "x86_64-unknown-linux-gnu" + +; Check that a <4 x float> compare is generated and that we are +; not stuck in an endless loop. + +; CHECK: cmp_2_floats +; CHECK: cmpordps +; CHECK: ret + +define void @cmp_2_floats() { +entry: + %0 = fcmp oeq <2 x float> undef, undef + %1 = select <2 x i1> %0, <2 x float> undef, <2 x float> undef + store <2 x float> %1, <2 x float>* undef + ret void +} + +; CHECK: cmp_2_doubles +; CHECK: cmpordpd +; CHECK: blendvpd +; CHECK: ret +define void @cmp_2_doubles() { +entry: + %0 = fcmp oeq <2 x double> undef, undef + %1 = select <2 x i1> %0, <2 x double> undef, <2 x double> undef + store <2 x double> %1, <2 x double>* undef + ret void +} |