summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-10-22 12:39:25 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-10-22 12:39:25 +0000
commit5b2bba61229fb8c262be90ef7705b41cb29edde0 (patch)
treee742905e9d0e09e38f13957069e4229d68f074eb /test
parentb8dcb314f7f9c5c0f068a322c689a64881d78b70 (diff)
downloadllvm-5b2bba61229fb8c262be90ef7705b41cb29edde0.tar.gz
llvm-5b2bba61229fb8c262be90ef7705b41cb29edde0.tar.bz2
llvm-5b2bba61229fb8c262be90ef7705b41cb29edde0.tar.xz
Fix pr11193.
SHL inserts zeros from the right, thus even when the original sign_extend_inreg value was of 1-bit, we need to sra. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2011-10-21-widen-cmp.ll15
1 files changed, 15 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
index aa1a60026f..2fe645b078 100644
--- a/test/CodeGen/X86/2011-10-21-widen-cmp.ll
+++ b/test/CodeGen/X86/2011-10-21-widen-cmp.ll
@@ -28,3 +28,18 @@ entry:
store <2 x double> %1, <2 x double>* undef
ret void
}
+
+; CHECK: mp_11193
+; CHECK: psraw $15
+; CHECK: ret
+define void @mp_11193(<8 x float> * nocapture %aFOO, <8 x float>* nocapture %RET)
+nounwind {
+allocas:
+ %bincmp = fcmp olt <8 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 9.000000e+00, float 1.000000e+00, float 9.000000e+00, float 1.000000e+00> , <float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00>
+ %t = extractelement <8 x i1> %bincmp, i32 0
+ %ft = sitofp i1 %t to float
+ %pp = bitcast <8 x float>* %RET to float*
+ store float %ft, float* %pp
+ ret void
+}
+