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)
commit86c88c938aec8006d2ce83325ec1f31e1154620b
treeef60bca1c51bdeb69234a232de93a53c8ed6f006
parent6996fd0b543cf8bd4a0d4e09e80a168f0ae052c5
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167750 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/BBVectorize.cpp
test/Transforms/BBVectorize/X86/sh-rec.ll [new file with mode: 0644]