mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 14:10:58 +00:00
clarify some comments, simplify some checks, fix:
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32420 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5bd2db38f8
commit
82e8a8ffe4
@ -1371,24 +1371,24 @@ SCEVHandle ScalarEvolutionsImpl::createSCEV(Value *V) {
|
||||
break;
|
||||
|
||||
case Instruction::Trunc:
|
||||
// We must prevent boolean types such as setne, etc. from entering here
|
||||
// because we don't want to pass SCEVUnknown to the TruncateExpr.
|
||||
if (I->getType()->isInteger() && I->getOperand(0)->getType()->isInteger())
|
||||
// We don't handle trunc to bool yet.
|
||||
if (I->getType()->isInteger())
|
||||
return SCEVTruncateExpr::get(getSCEV(I->getOperand(0)),
|
||||
I->getType()->getUnsignedVersion());
|
||||
break;
|
||||
|
||||
case Instruction::ZExt:
|
||||
// We must prevent boolean types such as setne, etc. from entering here
|
||||
// because we don't want to pass SCEVUnknown to the ZExtExpr.
|
||||
if (I->getType()->isInteger() && I->getOperand(0)->getType()->isInteger())
|
||||
// We don't handle zext from bool yet.
|
||||
if (I->getOperand(0)->getType()->isInteger())
|
||||
return SCEVZeroExtendExpr::get(getSCEV(I->getOperand(0)),
|
||||
I->getType()->getUnsignedVersion());
|
||||
break;
|
||||
|
||||
case Instruction::BitCast:
|
||||
// BitCasts are no-op casts so we just eliminate the cast.
|
||||
return getSCEV(I->getOperand(0));
|
||||
if (I->getType()->isInteger() && I->getOperand(0)->getType()->isInteger())
|
||||
return getSCEV(I->getOperand(0));
|
||||
break;
|
||||
|
||||
case Instruction::PHI:
|
||||
return createNodeForPHI(cast<PHINode>(I));
|
||||
|
Loading…
Reference in New Issue
Block a user