From 3717aa5ddbf9bd5b14f9604b5bd0803dc7e8fe8a Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sat, 11 Jun 2016 19:17:15 +0000 Subject: This reverts recent expression type changes The recent expression type changes still need more discussion, which will happen on phabricator or on the mailing list. The precise list of commits reverted are: - "Refactor division generation code" - "[NFC] Generate runtime checks after the SCoP" - "[FIX] Determine insertion point during SCEV expansion" - "Look through IntToPtr & PtrToInt instructions" - "Use minimal types for generated expressions" - "Temporarily promote values to i64 again" - "[NFC] Avoid unnecessary comparison for min/max expressions" - "[Polly] Fix -Wunused-variable warnings (NFC)" - "[NFC] Simplify min/max expression generation" - "Simplify the type adjustment in the IslExprBuilder" Some of them are just reverted as we would otherwise get conflicts. I will try to re-commit them if possible. llvm-svn: 272483 --- polly/lib/CodeGen/LoopGenerators.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'polly/lib/CodeGen/LoopGenerators.cpp') diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index 960e0cc..566e460 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -61,8 +61,6 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, assert(LB->getType() == UB->getType() && "Types of loop bounds do not match"); IntegerType *LoopIVType = dyn_cast(UB->getType()); assert(LoopIVType && "UB is not integer?"); - assert((LoopIVType == LB->getType() && LoopIVType == Stride->getType()) && - "LB, UB and Stride should have equal types."); BasicBlock *BeforeBB = Builder.GetInsertBlock(); BasicBlock *GuardBB = @@ -123,6 +121,7 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, Builder.SetInsertPoint(HeaderBB); PHINode *IV = Builder.CreatePHI(LoopIVType, 2, "polly.indvar"); IV->addIncoming(LB, PreHeaderBB); + Stride = Builder.CreateZExtOrBitCast(Stride, LoopIVType); Value *IncrementedIV = Builder.CreateNSWAdd(IV, Stride, "polly.indvar_next"); Value *LoopCondition; UB = Builder.CreateSub(UB, Stride, "polly.adjust_ub"); @@ -148,12 +147,6 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, Value *ParallelLoopGenerator::createParallelLoop( Value *LB, Value *UB, Value *Stride, SetVector &UsedValues, ValueMapT &Map, BasicBlock::iterator *LoopBody) { - - // Adjust the types to match the GOMP API. - LB = Builder.CreateSExt(LB, LongType); - UB = Builder.CreateSExt(UB, LongType); - Stride = Builder.CreateSExt(Stride, LongType); - Function *SubFn; AllocaInst *Struct = storeValuesIntoStruct(UsedValues); -- cgit v1.1