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)
commit62657090de3a5731bf644437701ccd78c247119f
treed5dcee22a30a779d7b495499606feb9c04627023
parent85f6cbd1a5dc0071b3b4a7387e66479bbdfb3d13
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.

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