[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
sabre at nondot.org
Sun Dec 10 16:12:46 PST 2006
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.67 -> 1.68
---
Log message:
clarify some comments, simplify some checks, fix:
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll
---
Diffs of the changes: (+7 -7)
ScalarEvolution.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.67 llvm/lib/Analysis/ScalarEvolution.cpp:1.68
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.67 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/ScalarEvolution.cpp Sun Dec 10 18:12:31 2006
@@ -1371,24 +1371,24 @@
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));
More information about the llvm-commits
mailing list