mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 22:46:20 +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;
|
break;
|
||||||
|
|
||||||
case Instruction::Trunc:
|
case Instruction::Trunc:
|
||||||
// We must prevent boolean types such as setne, etc. from entering here
|
// We don't handle trunc to bool yet.
|
||||||
// because we don't want to pass SCEVUnknown to the TruncateExpr.
|
if (I->getType()->isInteger())
|
||||||
if (I->getType()->isInteger() && I->getOperand(0)->getType()->isInteger())
|
|
||||||
return SCEVTruncateExpr::get(getSCEV(I->getOperand(0)),
|
return SCEVTruncateExpr::get(getSCEV(I->getOperand(0)),
|
||||||
I->getType()->getUnsignedVersion());
|
I->getType()->getUnsignedVersion());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Instruction::ZExt:
|
case Instruction::ZExt:
|
||||||
// We must prevent boolean types such as setne, etc. from entering here
|
// We don't handle zext from bool yet.
|
||||||
// because we don't want to pass SCEVUnknown to the ZExtExpr.
|
if (I->getOperand(0)->getType()->isInteger())
|
||||||
if (I->getType()->isInteger() && I->getOperand(0)->getType()->isInteger())
|
|
||||||
return SCEVZeroExtendExpr::get(getSCEV(I->getOperand(0)),
|
return SCEVZeroExtendExpr::get(getSCEV(I->getOperand(0)),
|
||||||
I->getType()->getUnsignedVersion());
|
I->getType()->getUnsignedVersion());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Instruction::BitCast:
|
case Instruction::BitCast:
|
||||||
// BitCasts are no-op casts so we just eliminate the cast.
|
// 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:
|
case Instruction::PHI:
|
||||||
return createNodeForPHI(cast<PHINode>(I));
|
return createNodeForPHI(cast<PHINode>(I));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user