mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 03:06:28 +00:00
Revert "[CodeGenPrepare] Scan past debug intrinsics to find select candidates (NFC)"
This causes crashes due to the interleaved dbg.value intrinsics being left at the end of basic blocks, causing the actual terminators (br, etc) to be not where they should be (not at the end of the block), leading to later crashes. Further discussion on the original commit thread. This reverts commit r340368. llvm-svn: 340794
This commit is contained in:
parent
af6dad54c0
commit
cfd04c50e1
@ -5602,10 +5602,9 @@ bool CodeGenPrepare::optimizeSelectInst(SelectInst *SI) {
|
||||
// Find all consecutive select instructions that share the same condition.
|
||||
SmallVector<SelectInst *, 2> ASI;
|
||||
ASI.push_back(SI);
|
||||
for (Instruction *NextInst = SI->getNextNonDebugInstruction();
|
||||
NextInst != SI->getParent()->getTerminator();
|
||||
NextInst = NextInst->getNextNonDebugInstruction()) {
|
||||
SelectInst *I = dyn_cast<SelectInst>(NextInst);
|
||||
for (BasicBlock::iterator It = ++BasicBlock::iterator(SI);
|
||||
It != SI->getParent()->end(); ++It) {
|
||||
SelectInst *I = dyn_cast<SelectInst>(&*It);
|
||||
if (I && SI->getCondition() == I->getCondition()) {
|
||||
ASI.push_back(I);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user