BBVectorize: Use a more sophisticated check for input cost
authorHal Finkel <hfinkel@anl.gov>
Mon, 12 Nov 2012 21:21:02 +0000 (21:21 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 12 Nov 2012 21:21:02 +0000 (21:21 +0000)
commit9cf33729316852043371235a33e310f34132afa8
treed247a998f229429c73208991dadf347f1bf71422
parentda5919ffa10c251091482f5aea0c30eca123aa54
BBVectorize: Use a more sophisticated check for input cost

The old checking code, which assumed that input shuffles and insert-elements
could always be folded (and thus were free) is too simple.
This can only happen in special circumstances.
Using the simple check caused infinite recursion.

llvm-svn: 167750
llvm/lib/Transforms/Vectorize/BBVectorize.cpp
llvm/test/Transforms/BBVectorize/X86/sh-rec.ll [new file with mode: 0644]