1 # RUN: llc -march=hexagon -enable-subreg-liveness -start-after machine-scheduler -stop-after stack-slot-coloring -o - %s | FileCheck %s
4 target triple = "hexagon"
6 ; Function Attrs: nounwind optsize
7 define void @main() #0 {
11 for.body: ; preds = %if.end82, %entry
12 %lsr.iv = phi i32 [ %lsr.iv.next, %if.end82 ], [ 524288, %entry ]
13 %call9 = tail call i32 @lrand48() #0
14 %conv10 = sext i32 %call9 to i64
15 %shr11 = lshr i64 %conv10, 9
16 %or12 = or i64 0, %shr11
17 %call14 = tail call i32 @lrand48() #0
18 %conv15138 = zext i32 %call14 to i64
19 %shr16 = lshr i64 %conv15138, 9
20 %0 = call i64 @llvm.hexagon.S2.extractup(i64 %conv15138, i32 22, i32 9)
22 %shl17 = shl i64 %shr16, 42
24 %or26 = or i64 %or22, 0
25 %shr30 = lshr i64 undef, 25
26 %2 = call i64 @llvm.hexagon.S2.extractup(i64 undef, i32 6, i32 25)
27 %and = and i64 %shr30, 63
29 %add = add i64 %sub, -1
30 %shl37 = shl i64 %add, 0
31 %call38 = tail call i32 @lrand48() #0
32 %conv39141 = zext i32 %call38 to i64
33 %shr40 = lshr i64 %conv39141, 25
34 %3 = call i64 @llvm.hexagon.S2.extractup(i64 %conv39141, i32 6, i32 25)
35 %and41 = and i64 %shr40, 63
36 %sub43 = shl i64 2, %3
37 %add45 = add i64 %sub43, -1
38 %call46 = tail call i32 @lrand48() #0
39 %shr48 = lshr i64 undef, 25
40 %4 = call i64 @llvm.hexagon.S2.extractup(i64 undef, i32 6, i32 25)
41 %and49 = and i64 %shr48, 63
42 %shl50 = shl i64 %add45, %4
43 %and52 = and i64 %shl37, %or12
44 %and54 = and i64 %shl50, %or26
45 store i64 %and54, ptr undef, align 8
46 %cmp56 = icmp eq i64 %and52, 0
47 br i1 %cmp56, label %for.end, label %if.end82
49 if.end82: ; preds = %for.body
50 %lsr.iv.next = add nsw i32 %lsr.iv, -1
51 %exitcond = icmp eq i32 %lsr.iv.next, 0
52 br i1 %exitcond, label %for.end, label %for.body
54 for.end: ; preds = %if.end82, %for.body
58 declare i32 @lrand48() #0
59 declare i64 @llvm.hexagon.S2.extractup(i64, i32, i32) #1
61 attributes #0 = { nounwind optsize "target-cpu"="hexagonv55" "target-features"="-hvx" }
62 attributes #1 = { nounwind readnone }
68 tracksRegLiveness: true
70 - { id: 0, class: intregs }
71 - { id: 1, class: intregs }
72 - { id: 2, class: intregs }
73 - { id: 3, class: intregs }
74 - { id: 4, class: doubleregs }
75 - { id: 5, class: intregs }
76 - { id: 6, class: doubleregs }
77 - { id: 7, class: doubleregs }
78 - { id: 8, class: doubleregs }
79 - { id: 9, class: doubleregs }
80 - { id: 10, class: intregs }
81 - { id: 11, class: doubleregs }
82 - { id: 12, class: doubleregs }
83 - { id: 13, class: doubleregs }
84 - { id: 14, class: intregs }
85 - { id: 15, class: doubleregs }
86 - { id: 16, class: doubleregs }
87 - { id: 17, class: intregs }
88 - { id: 18, class: doubleregs }
89 - { id: 19, class: intregs }
90 - { id: 20, class: doubleregs }
91 - { id: 21, class: doubleregs }
92 - { id: 22, class: doubleregs }
93 - { id: 23, class: intregs }
94 - { id: 24, class: doubleregs }
95 - { id: 25, class: predregs }
96 - { id: 26, class: predregs }
97 - { id: 27, class: intregs }
98 - { id: 28, class: intregs }
99 - { id: 29, class: doubleregs }
100 - { id: 30, class: intregs }
101 - { id: 31, class: intregs }
102 - { id: 32, class: doubleregs }
103 - { id: 33, class: intregs }
104 - { id: 34, class: intregs }
105 - { id: 35, class: doubleregs }
106 - { id: 36, class: doubleregs }
107 - { id: 37, class: intregs }
108 - { id: 38, class: intregs }
109 - { id: 39, class: doubleregs }
110 - { id: 40, class: doubleregs }
111 - { id: 41, class: intregs }
112 - { id: 42, class: intregs }
113 - { id: 43, class: doubleregs }
114 - { id: 44, class: intregs }
115 - { id: 45, class: intregs }
116 - { id: 46, class: doubleregs }
117 - { id: 47, class: doubleregs }
118 - { id: 48, class: doubleregs }
119 - { id: 49, class: doubleregs }
120 - { id: 50, class: doubleregs }
121 - { id: 51, class: doubleregs }
122 - { id: 52, class: intregs }
123 - { id: 53, class: intregs }
124 - { id: 54, class: intregs }
125 - { id: 55, class: doubleregs }
126 - { id: 56, class: doubleregs }
127 - { id: 57, class: intregs }
128 - { id: 58, class: intregs }
129 - { id: 59, class: intregs }
131 isFrameAddressTaken: false
132 isReturnAddressTaken: false
141 hasOpaqueSPAdjustment: false
143 hasMustTailInVarArgFunc: false
146 successors: %bb.1.for.body
148 %59 = A2_tfrsi 524288
149 undef %32.isub_hi = A2_tfrsi 0
150 %8 = S2_extractup undef %9, 6, 25
153 %13 = S2_asl_r_p_acc %13, %47, %8.isub_lo
156 ; CHECK: $d2 = S2_extractup undef renamable $d0, 6, 25
157 ; CHECK: $d0 = A2_tfrpi 2
158 ; CHECK: $d13 = A2_tfrpi -1
159 ; CHECK-NOT: undef $r4
162 successors: %bb.3.for.end, %bb.2.if.end82
164 ADJCALLSTACKDOWN 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29
165 J2_call @lrand48, implicit-def dead $d0, implicit-def dead $d1, implicit-def dead $d2, implicit-def dead $d3, implicit-def dead $d4, implicit-def dead $d5, implicit-def dead $d6, implicit-def dead $d7, implicit-def dead $r28, implicit-def dead $r31, implicit-def dead $p0, implicit-def dead $p1, implicit-def dead $p2, implicit-def dead $p3, implicit-def dead $m0, implicit-def dead $m1, implicit-def dead $lc0, implicit-def dead $lc1, implicit-def dead $sa0, implicit-def dead $sa1, implicit-def dead $usr, implicit-def $usr_ovf, implicit-def dead $cs0, implicit-def dead $cs1, implicit-def dead $w0, implicit-def dead $w1, implicit-def dead $w2, implicit-def dead $w3, implicit-def dead $w4, implicit-def dead $w5, implicit-def dead $w6, implicit-def dead $w7, implicit-def dead $w8, implicit-def dead $w9, implicit-def dead $w10, implicit-def dead $w11, implicit-def dead $w12, implicit-def dead $w13, implicit-def dead $w14, implicit-def dead $w15, implicit-def dead $q0, implicit-def dead $q1, implicit-def dead $q2, implicit-def dead $q3, implicit-def $r0
166 ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29
167 undef %29.isub_lo = COPY killed $r0
168 %29.isub_hi = S2_asr_i_r %29.isub_lo, 31
169 ADJCALLSTACKDOWN 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29
170 J2_call @lrand48, implicit-def dead $d0, implicit-def dead $d1, implicit-def dead $d2, implicit-def dead $d3, implicit-def dead $d4, implicit-def dead $d5, implicit-def dead $d6, implicit-def dead $d7, implicit-def dead $r28, implicit-def dead $r31, implicit-def dead $p0, implicit-def dead $p1, implicit-def dead $p2, implicit-def dead $p3, implicit-def dead $m0, implicit-def dead $m1, implicit-def dead $lc0, implicit-def dead $lc1, implicit-def dead $sa0, implicit-def dead $sa1, implicit-def dead $usr, implicit-def $usr_ovf, implicit-def dead $cs0, implicit-def dead $cs1, implicit-def dead $w0, implicit-def dead $w1, implicit-def dead $w2, implicit-def dead $w3, implicit-def dead $w4, implicit-def dead $w5, implicit-def dead $w6, implicit-def dead $w7, implicit-def dead $w8, implicit-def dead $w9, implicit-def dead $w10, implicit-def dead $w11, implicit-def dead $w12, implicit-def dead $w13, implicit-def dead $w14, implicit-def dead $w15, implicit-def dead $q0, implicit-def dead $q1, implicit-def dead $q2, implicit-def dead $q3, implicit-def $r0
171 ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29
172 %32.isub_lo = COPY killed $r0
173 %7 = S2_extractup %32, 22, 9
174 ADJCALLSTACKDOWN 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29
175 J2_call @lrand48, implicit-def dead $d0, implicit-def dead $d1, implicit-def dead $d2, implicit-def dead $d3, implicit-def dead $d4, implicit-def dead $d5, implicit-def dead $d6, implicit-def dead $d7, implicit-def dead $r28, implicit-def dead $r31, implicit-def dead $p0, implicit-def dead $p1, implicit-def dead $p2, implicit-def dead $p3, implicit-def dead $m0, implicit-def dead $m1, implicit-def dead $lc0, implicit-def dead $lc1, implicit-def dead $sa0, implicit-def dead $sa1, implicit-def dead $usr, implicit-def $usr_ovf, implicit-def dead $cs0, implicit-def dead $cs1, implicit-def dead $w0, implicit-def dead $w1, implicit-def dead $w2, implicit-def dead $w3, implicit-def dead $w4, implicit-def dead $w5, implicit-def dead $w6, implicit-def dead $w7, implicit-def dead $w8, implicit-def dead $w9, implicit-def dead $w10, implicit-def dead $w11, implicit-def dead $w12, implicit-def dead $w13, implicit-def dead $w14, implicit-def dead $w15, implicit-def dead $q0, implicit-def dead $q1, implicit-def dead $q2, implicit-def dead $q3, implicit-def $r0
176 ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29
177 undef %43.isub_lo = COPY killed $r0
178 %43.isub_hi = COPY %32.isub_hi
179 %16 = S2_extractup %43, 6, 25
181 %18 = S2_asl_r_p_acc %18, %47, %16.isub_lo
182 ADJCALLSTACKDOWN 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29
183 J2_call @lrand48, implicit-def dead $d0, implicit-def dead $d1, implicit-def dead $d2, implicit-def dead $d3, implicit-def dead $d4, implicit-def dead $d5, implicit-def dead $d6, implicit-def dead $d7, implicit-def dead $r28, implicit-def dead $r31, implicit-def dead $p0, implicit-def dead $p1, implicit-def dead $p2, implicit-def dead $p3, implicit-def dead $m0, implicit-def dead $m1, implicit-def dead $lc0, implicit-def dead $lc1, implicit-def dead $sa0, implicit-def dead $sa1, implicit-def dead $usr, implicit-def $usr_ovf, implicit-def dead $cs0, implicit-def dead $cs1, implicit-def dead $w0, implicit-def dead $w1, implicit-def dead $w2, implicit-def dead $w3, implicit-def dead $w4, implicit-def dead $w5, implicit-def dead $w6, implicit-def dead $w7, implicit-def dead $w8, implicit-def dead $w9, implicit-def dead $w10, implicit-def dead $w11, implicit-def dead $w12, implicit-def dead $w13, implicit-def dead $w14, implicit-def dead $w15, implicit-def dead $q0, implicit-def dead $q1, implicit-def dead $q2, implicit-def dead $q3
184 ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29
185 %22 = S2_asl_r_p %18, %8.isub_lo
187 %21 = S2_lsr_i_p_and %21, %29, 9
188 %22 = S2_asl_i_p_and %22, %7, 42
189 S2_storerd_io undef %23, 0, %22 :: (store (s64) into `ptr undef`)
190 %25 = C2_cmpeqp %21, %51
191 J2_jumpt %25, %bb.3.for.end, implicit-def dead $pc
192 J2_jump %bb.2.if.end82, implicit-def dead $pc
195 successors: %bb.3.for.end, %bb.1.for.body
197 %59 = A2_addi %59, -1
198 %26 = C2_cmpeqi %59, 0
199 J2_jumpf %26, %bb.1.for.body, implicit-def dead $pc
200 J2_jump %bb.3.for.end, implicit-def dead $pc