summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-08 03:44:51 +0000
committerChris Lattner <sabre@nondot.org>2009-09-08 03:44:51 +0000
commit4cb81bdd5689a5bbe8c270c70f503c9d9779d5b1 (patch)
treec9a93107a31ba0c8408d09bab38ebfc3efe17ab5 /test/Transforms/InstCombine/crash.ll
parentc8dee3f7ad60e76bdac597ee47f8d9e3470cc8ff (diff)
downloadllvm-4cb81bdd5689a5bbe8c270c70f503c9d9779d5b1.tar.gz
llvm-4cb81bdd5689a5bbe8c270c70f503c9d9779d5b1.tar.bz2
llvm-4cb81bdd5689a5bbe8c270c70f503c9d9779d5b1.tar.xz
instcombine transforms vector loads that are only used by
extractelement operations into a bitcast of the pointer, then a gep, then a scalar load. Disable this when the vector only has one element, because it leads to infinite loops in instcombine (PR4908). This transformation seems like a really bad idea to me, as it will likely disable CSE of vector load/stores etc and can be better done in the code generator when profitable. This goes all the way back to the first days of packed types, r25299 specifically. I'll let those people who care about the performance of vector code decide what to do with this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/crash.ll')
-rw-r--r--test/Transforms/InstCombine/crash.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/crash.ll b/test/Transforms/InstCombine/crash.ll
index c252ac9dcc..d475ab5bc5 100644
--- a/test/Transforms/InstCombine/crash.ll
+++ b/test/Transforms/InstCombine/crash.ll
@@ -31,3 +31,16 @@ entry:
ret <2 x i64> %conv3.i44
}
+
+; PR4908
+define void @test2(<1 x i16>* nocapture %b, i32* nocapture %c) nounwind ssp {
+entry:
+ %arrayidx = getelementptr inbounds <1 x i16>* %b, i64 undef ; <<1 x i16>*>
+ %tmp2 = load <1 x i16>* %arrayidx ; <<1 x i16>> [#uses=1]
+ %tmp6 = bitcast <1 x i16> %tmp2 to i16 ; <i16> [#uses=1]
+ %tmp7 = zext i16 %tmp6 to i32 ; <i32> [#uses=1]
+ %ins = or i32 0, %tmp7 ; <i32> [#uses=1]
+ %arrayidx20 = getelementptr inbounds i32* %c, i64 undef ; <i32*> [#uses=1]
+ store i32 %ins, i32* %arrayidx20
+ ret void
+}