[llvm-commits] [llvm] r123154 - in /llvm/trunk/test/Transforms/InstCombine: vec_demanded_elts-2.ll vec_demanded_elts-3.ll vec_demanded_elts.ll
Chandler Carruth
chandlerc at gmail.com
Sun Jan 9 18:53:58 PST 2011
Author: chandlerc
Date: Sun Jan 9 20:53:58 2011
New Revision: 123154
URL: http://llvm.org/viewvc/llvm-project?rev=123154&view=rev
Log:
Fold two related tests into the newly FileCheck-ized test, migrating
them to FileCheck as well.
Removed:
llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-2.ll
llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-3.ll
Modified:
llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts.ll
Removed: llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-2.ll?rev=123153&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-2.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-2.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: opt < %s -instcombine -S | not grep extractelement
-
-define void @get_image() nounwind {
-entry:
- %0 = call i32 @fgetc(i8* null) nounwind ; <i32> [#uses=1]
- %1 = trunc i32 %0 to i8 ; <i8> [#uses=1]
- %tmp2 = insertelement <100 x i8> zeroinitializer, i8 %1, i32 1 ; <<100 x i8>> [#uses=1]
- %tmp1 = extractelement <100 x i8> %tmp2, i32 0 ; <i8> [#uses=1]
- %2 = icmp eq i8 %tmp1, 80 ; <i1> [#uses=1]
- br i1 %2, label %bb2, label %bb3
-
-bb2: ; preds = %entry
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- unreachable
-}
-
-declare i32 @fgetc(i8*)
Removed: llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-3.ll?rev=123153&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-3.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts-3.ll (removed)
@@ -1,14 +0,0 @@
-; RUN: opt < %s -instcombine -S | not grep load
-; PR4340
-
-define void @vac(<4 x float>* nocapture %a) nounwind {
-entry:
- %tmp1 = load <4 x float>* %a ; <<4 x float>> [#uses=1]
- %vecins = insertelement <4 x float> %tmp1, float 0.000000e+00, i32 0 ; <<4 x float>> [#uses=1]
- %vecins4 = insertelement <4 x float> %vecins, float 0.000000e+00, i32 1; <<4 x float>> [#uses=1]
- %vecins6 = insertelement <4 x float> %vecins4, float 0.000000e+00, i32 2; <<4 x float>> [#uses=1]
- %vecins8 = insertelement <4 x float> %vecins6, float 0.000000e+00, i32 3; <<4 x float>> [#uses=1]
- store <4 x float> %vecins8, <4 x float>* %a
- ret void
-}
-
Modified: llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts.ll?rev=123154&r1=123153&r2=123154&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vec_demanded_elts.ll Sun Jan 9 20:53:58 2011
@@ -36,6 +36,42 @@
ret i32 %tmp21
}
+define void @get_image() nounwind {
+; CHECK: @get_image
+; CHECK-NOT: extractelement
+; CHECK: unreachable
+entry:
+ %0 = call i32 @fgetc(i8* null) nounwind ; <i32> [#uses=1]
+ %1 = trunc i32 %0 to i8 ; <i8> [#uses=1]
+ %tmp2 = insertelement <100 x i8> zeroinitializer, i8 %1, i32 1 ; <<100 x i8>> [#uses=1]
+ %tmp1 = extractelement <100 x i8> %tmp2, i32 0 ; <i8> [#uses=1]
+ %2 = icmp eq i8 %tmp1, 80 ; <i1> [#uses=1]
+ br i1 %2, label %bb2, label %bb3
+
+bb2: ; preds = %entry
+ br label %bb3
+
+bb3: ; preds = %bb2, %entry
+ unreachable
+}
+
+; PR4340
+define void @vac(<4 x float>* nocapture %a) nounwind {
+; CHECK: @vac
+; CHECK-NOT: load
+; CHECK: ret
+entry:
+ %tmp1 = load <4 x float>* %a ; <<4 x float>> [#uses=1]
+ %vecins = insertelement <4 x float> %tmp1, float 0.000000e+00, i32 0 ; <<4 x float>> [#uses=1]
+ %vecins4 = insertelement <4 x float> %vecins, float 0.000000e+00, i32 1; <<4 x float>> [#uses=1]
+ %vecins6 = insertelement <4 x float> %vecins4, float 0.000000e+00, i32 2; <<4 x float>> [#uses=1]
+ %vecins8 = insertelement <4 x float> %vecins6, float 0.000000e+00, i32 3; <<4 x float>> [#uses=1]
+ store <4 x float> %vecins8, <4 x float>* %a
+ ret void
+}
+
+declare i32 @fgetc(i8*)
+
declare <4 x float> @llvm.x86.sse.sub.ss(<4 x float>, <4 x float>)
declare <4 x float> @llvm.x86.sse.mul.ss(<4 x float>, <4 x float>)
More information about the llvm-commits
mailing list