1 ; RUN: llc -verify-regalloc < %s | FileCheck %s
2 ; Check all spills are rematerialized.
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-unknown-linux-gnu"
8 @b = common global double 0.000000e+00, align 8
9 @a = common global i32 0, align 4
11 ; Function Attrs: nounwind uwtable
12 define i32 @uniform_testdata(i32 %p1) {
14 %cmp3 = icmp sgt i32 %p1, 0
15 br i1 %cmp3, label %for.body.preheader, label %for.end
17 for.body.preheader: ; preds = %entry
18 %tmp = add i32 %p1, -1
19 %xtraiter = and i32 %p1, 7
20 %lcmp.mod = icmp eq i32 %xtraiter, 0
21 br i1 %lcmp.mod, label %for.body.preheader.split, label %for.body.prol.preheader
23 for.body.prol.preheader: ; preds = %for.body.preheader
24 br label %for.body.prol
26 for.body.prol: ; preds = %for.body.prol, %for.body.prol.preheader
27 %i.04.prol = phi i32 [ %inc.prol, %for.body.prol ], [ 0, %for.body.prol.preheader ]
28 %prol.iter = phi i32 [ %prol.iter.sub, %for.body.prol ], [ %xtraiter, %for.body.prol.preheader ]
29 %tmp1 = load double, double* @b, align 8
30 %call.prol = tail call double @pow(double %tmp1, double 2.500000e-01)
31 %inc.prol = add nuw nsw i32 %i.04.prol, 1
32 %prol.iter.sub = add i32 %prol.iter, -1
33 %prol.iter.cmp = icmp eq i32 %prol.iter.sub, 0
34 br i1 %prol.iter.cmp, label %for.body.preheader.split.loopexit, label %for.body.prol
36 for.body.preheader.split.loopexit: ; preds = %for.body.prol
37 %inc.prol.lcssa = phi i32 [ %inc.prol, %for.body.prol ]
38 br label %for.body.preheader.split
40 for.body.preheader.split: ; preds = %for.body.preheader.split.loopexit, %for.body.preheader
41 %i.04.unr = phi i32 [ 0, %for.body.preheader ], [ %inc.prol.lcssa, %for.body.preheader.split.loopexit ]
42 %tmp2 = icmp ult i32 %tmp, 7
43 br i1 %tmp2, label %for.end.loopexit, label %for.body.preheader.split.split
45 for.body.preheader.split.split: ; preds = %for.body.preheader.split
48 for.body: ; preds = %for.body, %for.body.preheader.split.split
49 %i.04 = phi i32 [ %i.04.unr, %for.body.preheader.split.split ], [ %inc.7, %for.body ]
50 %tmp3 = load double, double* @b, align 8
51 %call = tail call double @pow(double %tmp3, double 2.500000e-01)
52 %tmp4 = load double, double* @b, align 8
53 %call.1 = tail call double @pow(double %tmp4, double 2.500000e-01)
54 %inc.7 = add nsw i32 %i.04, 8
55 %exitcond.7 = icmp eq i32 %inc.7, %p1
56 br i1 %exitcond.7, label %for.end.loopexit.unr-lcssa, label %for.body
58 for.end.loopexit.unr-lcssa: ; preds = %for.body
59 br label %for.end.loopexit
61 for.end.loopexit: ; preds = %for.end.loopexit.unr-lcssa, %for.body.preheader.split
64 for.end: ; preds = %for.end.loopexit, %entry
65 %tmp5 = load i32, i32* @a, align 4
69 ; Function Attrs: nounwind
70 declare double @pow(double, double)