1 ; RUN: opt < %s -analyze -delinearize
4 ; Test that SCEV divide code doesn't crash when attempting to create a SCEV
5 ; with operands of different types. In this case, the visitAddRecExpr
6 ; function tries to create an AddRec where the start and step are different
9 target datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32"
11 define fastcc void @test() {
13 %0 = load i16, i16* undef, align 2
14 %conv21 = zext i16 %0 to i32
15 br label %for.cond7.preheader
18 %p1.022 = phi i8* [ undef, %entry ], [ %add.ptr, %for.end ]
22 %arrayidx.phi = phi i8* [ %p1.022, %for.cond7.preheader ], [ undef, %for.body11 ]
23 store i8 undef, i8* %arrayidx.phi, align 1
24 br i1 undef, label %for.body11, label %for.end
27 %add.ptr = getelementptr inbounds i8, i8* %p1.022, i32 %conv21
28 br label %for.cond7.preheader