1; RUN: opt -loop-reduce -S < %s | FileCheck %s 2; 3; Test SCEVExpander reusing a phi->gep->phi IV when SCEV "wrongly" 4; reports the expression as an IntegerTy. 5 6target triple = "x86_64-apple-darwin" 7 8; CHECK-LABEL: @test( 9; CHECK: phi 10; CHECK-NOT: phi 11define void @test(i32 %rowStride) ssp align 2 { 12entry: 13 %cond = select i1 undef, i32 %rowStride, i32 4 14 br label %for.end 15 16for.end.critedge: ; preds = %for.end 17 br label %for.end 18 19for.end: ; preds = %for.end.critedge, %entry 20 br i1 undef, label %for.body83, label %for.end.critedge 21 22for.body83: ; preds = %for.body83, %for.end 23 %ptr.0157 = phi i8* [ %add.ptr96, %for.body83 ], [ null, %for.end ] 24 store i8 undef, i8* %ptr.0157, align 1 25 %add.ptr96 = getelementptr inbounds i8* %ptr.0157, i32 %cond 26 br label %for.body83 27} 28