Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
llvm-svn: 19555
This commit is contained in:
parent
57fb55d750
commit
c3ed31f837
|
@ -959,7 +959,8 @@ static SetCondInst *canFoldSetCCIntoBranchOrSelect(Value *V) {
|
|||
if (SetCondInst *SCI = dyn_cast<SetCondInst>(V))
|
||||
if (SCI->hasOneUse()) {
|
||||
Instruction *User = cast<Instruction>(SCI->use_back());
|
||||
if ((isa<BranchInst>(User) || isa<SelectInst>(User)) &&
|
||||
if ((isa<BranchInst>(User) ||
|
||||
(isa<SelectInst>(User) && User->getOperand(0) == V)) &&
|
||||
SCI->getParent() == User->getParent())
|
||||
return SCI;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue