When we vectorize across multiple basic blocks we may vectorize PHINodes that create...
authorNadav Rotem <nrotem@apple.com>
Mon, 22 Jul 2013 22:18:07 +0000 (22:18 +0000)
committerNadav Rotem <nrotem@apple.com>
Mon, 22 Jul 2013 22:18:07 +0000 (22:18 +0000)
commitcf0dcdc71c8e568692b255b6338c289d85cb9a1e
tree30e9198dace5c053a00d2d78bcfe3817382dd90d
parent6c655f237e4a38258a95d47bb3b624fa99716e35
When we vectorize across multiple basic blocks we may vectorize PHINodes that create a cycle. We already break the cycle on phi-nodes, but arithmetic operations are still uplicated. This patch adds code that checks if the operation that we are vectorizing was vectorized during the visit of the operands and uses this value if it can.

llvm-svn: 186883
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/cycle_dup.ll [new file with mode: 0644]