aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/2008-07-23-VSetCC.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-07 22:47:46 +0000
committerChris Lattner <sabre@nondot.org>2009-07-07 22:47:46 +0000
commit5962ed0a36bfad0fb591998964a0da7ddecda1f2 (patch)
tree828bf5a92f16e3e32c019d99611d51265130d6f8 /test/CodeGen/X86/2008-07-23-VSetCC.ll
parent9800e849c10fbcf9f6fcff3698165a01930b8ac2 (diff)
downloadexternal_llvm-5962ed0a36bfad0fb591998964a0da7ddecda1f2.zip
external_llvm-5962ed0a36bfad0fb591998964a0da7ddecda1f2.tar.gz
external_llvm-5962ed0a36bfad0fb591998964a0da7ddecda1f2.tar.bz2
implement support for spliting and scalarizing vector setcc's. This
finishes off enough support for vector compares to get the icmp/fcmp version of 2008-07-23-VSetCC.ll passing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-07-23-VSetCC.ll')
-rw-r--r--test/CodeGen/X86/2008-07-23-VSetCC.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-07-23-VSetCC.ll b/test/CodeGen/X86/2008-07-23-VSetCC.ll
index da6c089..c7b439f 100644
--- a/test/CodeGen/X86/2008-07-23-VSetCC.ll
+++ b/test/CodeGen/X86/2008-07-23-VSetCC.ll
@@ -27,4 +27,32 @@ bb.nph: ; preds = %bb.nph, %0
ret void
}
+define void @entry2(i32 %m_task_id, i32 %start_x, i32 %end_x) nounwind {
+ br i1 false, label %bb.nph, label %._crit_edge
+
+bb.nph: ; preds = %bb.nph, %0
+ %X = icmp sgt <4 x i32> zeroinitializer, < i32 -128, i32 -128, i32 -128, i32 -128 > ; <<4 x i32>>:1 [#uses=1]
+ sext <4 x i1> %X to <4 x i32>
+ extractelement <4 x i32> %1, i32 3 ; <i32>:2 [#uses=1]
+ lshr i32 %2, 31 ; <i32>:3 [#uses=1]
+ trunc i32 %3 to i1 ; <i1>:4 [#uses=1]
+ select i1 %4, i32 -1, i32 0 ; <i32>:5 [#uses=1]
+ insertelement <4 x i32> zeroinitializer, i32 %5, i32 3 ; <<4 x i32>>:6 [#uses=1]
+ and <4 x i32> zeroinitializer, %6 ; <<4 x i32>>:7 [#uses=1]
+ bitcast <4 x i32> %7 to <4 x float> ; <<4 x float>>:8 [#uses=1]
+ fmul <4 x float> zeroinitializer, %8 ; <<4 x float>>:9 [#uses=1]
+ bitcast <4 x float> %9 to <4 x i32> ; <<4 x i32>>:10 [#uses=1]
+ or <4 x i32> %10, zeroinitializer ; <<4 x i32>>:11 [#uses=1]
+ bitcast <4 x i32> %11 to <4 x float> ; <<4 x float>>:12 [#uses=1]
+ fmul <4 x float> %12, < float 1.000000e+02, float 1.000000e+02, float 1.000000e+02, float 1.000000e+02 > ; <<4 x float>>:13 [#uses=1]
+ fsub <4 x float> %13, < float 1.000000e+02, float 1.000000e+02, float 1.000000e+02, float 1.000000e+02 > ; <<4 x float>>:14 [#uses=1]
+ extractelement <4 x float> %14, i32 3 ; <float>:15 [#uses=1]
+ call float @fmaxf( float 0.000000e+00, float %15 ) ; <float>:16 [#uses=0]
+ br label %bb.nph
+
+._crit_edge: ; preds = %0
+ ret void
+}
+
+
declare float @fmaxf(float, float)