diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-08 03:44:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-08 03:44:51 +0000 |
commit | 1ba36b786d8c051e764fb39e0c2503ba1f19dc92 (patch) | |
tree | c9a93107a31ba0c8408d09bab38ebfc3efe17ab5 /test | |
parent | a48dd11cea464022adf7c557c46b28abf148283a (diff) | |
download | external_llvm-1ba36b786d8c051e764fb39e0c2503ba1f19dc92.zip external_llvm-1ba36b786d8c051e764fb39e0c2503ba1f19dc92.tar.gz external_llvm-1ba36b786d8c051e764fb39e0c2503ba1f19dc92.tar.bz2 |
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')
-rw-r--r-- | test/Transforms/InstCombine/crash.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/crash.ll b/test/Transforms/InstCombine/crash.ll index c252ac9..d475ab5 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 +} |