1 ; 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 -passes=indvars < %s
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
8 ; Function Attrs: norecurse nounwind uwtable
9 define void @ehF(i1 %arg) #0 {
11 br i1 %arg, label %if.then.i, label %hup.exit
13 if.then.i: ; preds = %entry
14 br i1 %arg, label %for.body.lr.ph.i, label %hup.exit
16 for.body.lr.ph.i: ; preds = %if.then.i
19 for.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
28 hup.exit: ; preds = %for.body.i, %if.then.i, %entry
32 attributes #0 = { norecurse nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "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" }