[Support] Fix SaturatingMultiply<T>() to be correct (and fast), Re-enable Unit Tests
[oota-llvm.git] / test / Analysis / Delinearization / type_mismatch.ll
1 ; RUN: opt < %s -analyze -delinearize
2 ; REQUIRES: asserts
3
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
7 ; types.
8
9 target datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32"
10
11 define fastcc void @test() {
12 entry:
13   %0 = load i16, i16* undef, align 2
14   %conv21 = zext i16 %0 to i32
15   br label %for.cond7.preheader
16
17 for.cond7.preheader:
18   %p1.022 = phi i8* [ undef, %entry ], [ %add.ptr, %for.end ]
19   br label %for.body11
20
21 for.body11:
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
25
26 for.end:
27   %add.ptr = getelementptr inbounds i8, i8* %p1.022, i32 %conv21
28   br label %for.cond7.preheader
29 }