[LoopVersioning] Relax an assert for LCSSA PHIs
authorAdam Nemet <anemet@apple.com>
Tue, 22 Mar 2016 18:38:15 +0000 (18:38 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 22 Mar 2016 18:38:15 +0000 (18:38 +0000)
commit8b47e0d0ea7909fa2ffd9132d37b0c7b8885c97d
tree7c20a19b83bbe20fdb4b49c28951ed1d3bfc7dc8
parente409e688a328d1c61229653a7d4e1ab108cf3a3c
[LoopVersioning] Relax an assert for LCSSA PHIs

When you have multiple LCSSA (single-operand) PHIs that are converted
into two-operand PHIs due to versioning, only assert that the PHI
currently being converted has a single operand.  I.e. we don't want to
check PHIs that were converted earlier in the loop.

Fixes PR27023.

Thanks to Karl-Johan Karlsson for the minimized testcase!

llvm-svn: 264081
llvm/lib/Transforms/Utils/LoopVersioning.cpp
llvm/test/Transforms/LoopVersioning/lcssa.ll [new file with mode: 0644]