instcombine transforms vector loads that are only used by
authorChris Lattner <sabre@nondot.org>
Tue, 8 Sep 2009 03:44:51 +0000 (03:44 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 8 Sep 2009 03:44:51 +0000 (03:44 +0000)
commit4cb81bdd5689a5bbe8c270c70f503c9d9779d5b1
treec9a93107a31ba0c8408d09bab38ebfc3efe17ab5
parentc8dee3f7ad60e76bdac597ee47f8d9e3470cc8ff
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
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/crash.ll