blob: 0aa7ff08f926b3d5f96ef150dd93363b00089158 [file] [log] [blame]
Wei Mifc1cab32016-02-09 00:07:08 +00001; PR26529: Check the assumption of IndVarSimplify to do SCEV expansion in literal mode
2; instead of CanonicalMode is properly maintained in SCEVExpander::expand.
3; RUN: opt -indvars < %s
4
5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6target triple = "x86_64-unknown-linux-gnu"
7
8; Function Attrs: norecurse nounwind uwtable
9define void @ehF() #0 {
10entry:
11 br i1 undef, label %if.then.i, label %hup.exit
12
13if.then.i: ; preds = %entry
14 br i1 undef, label %for.body.lr.ph.i, label %hup.exit
15
16for.body.lr.ph.i: ; preds = %if.then.i
17 br label %for.body.i
18
19for.body.i: ; preds = %for.body.i, %for.body.lr.ph.i
20 %i.03.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %inc.i, %for.body.i ]
21 %k.02.i = phi i32 [ 1, %for.body.lr.ph.i ], [ %inc5.i, %for.body.i ]
22 %inc.i = add nsw i32 %i.03.i, 1
23 %idxprom.i = sext i32 %i.03.i to i64
24 %idxprom2.i = sext i32 %k.02.i to i64
25 %inc5.i = add nsw i32 %k.02.i, 1
26 br i1 false, label %for.body.i, label %hup.exit
27
28hup.exit: ; preds = %for.body.i, %if.then.i, %entry
29 ret void
30}
31
32attributes #0 = { norecurse nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }