For PR970:

Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2007-01-21 00:29:26 +00:00
parent 67f827ce5b
commit 24d6da5fed
13 changed files with 119 additions and 150 deletions

View File

@@ -123,8 +123,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
// Insert a unit add instruction right before the terminator corresponding
// to the back-edge.
Constant *One = Ty->isFloatingPoint() ? (Constant*)ConstantFP::get(Ty, 1.0)
: ConstantInt::get(Ty, 1);
Constant *One = ConstantInt::get(Ty, 1);
Instruction *Add = BinaryOperator::createAdd(PN, One, "indvar.next",
(*HPI)->getTerminator());