brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.2 KiB · e497575 Raw
182 lines · plain
1; RUN: llc -regalloc=greedy -relocation-model=pic  < %s 2>&1 | FileCheck %s2; Without the last chance recoloring, this test fails with:3; "ran out of registers".4 5; NOTE: With the fix to PR18883, we don't actually run out of registers here6; any more, and so those checks are disabled. This test remains only for general coverage.7; XXX: not llc -regalloc=greedy -relocation-model=pic -lcr-max-depth=0  < %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEPTH8; Test whether failure due to cutoff for depth is reported9 10; XXX: not llc -regalloc=greedy -relocation-model=pic -lcr-max-interf=1  < %s 2>&1 | FileCheck %s --check-prefix=CHECK-INTERF11; Test whether failure due to cutoff for interference is reported12 13; RUN: llc -regalloc=greedy -relocation-model=pic -lcr-max-interf=1 -lcr-max-depth=0 -exhaustive-register-search < %s > %t 2>&114; RUN: FileCheck --input-file=%t %s --check-prefix=CHECK-EXHAUSTIVE15; Test whether exhaustive-register-search can bypass the depth and interference cutoffs of last chance recoloring 16 17target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"18target triple = "i386-apple-macosx"19 20@fp_dh_36985b17790d59a27994eaab5dcb00ee = external constant [499 x i32]21@fp_dh_18716afa4a5354de0a302c8edb3b0ee1 = external global i3222@fp_dh_20a33cdeefab8f4c8887e82766cb9dcb = external global ptr23@fp_dh_9d93c897906e39883c58b034c8e786b2 = external global [5419648 x i8], align 1624 25; Function Attrs: nounwind ssp26; CHECK-NOT: ran out of registers during register allocation27; CHECK-INTERF: error: register allocation failed: maximum interference for recoloring reached28; CHECK-DEPTH: error: register allocation failed: maximum depth for recoloring reached29; CHECK-EXHAUSTIVE-NOT: error: register allocation failed: maximum {{depth|interference}} for recoloring reached30define void @fp_dh_f870bf31fd8ffe068450366e3f05389a(ptr %arg) #0 {31bb:32  indirectbr ptr undef, [label %bb85, label %bb206]33 34bb85:                                             ; preds = %bb222, %bb85, %bb35  store ptr blockaddress(@fp_dh_f870bf31fd8ffe068450366e3f05389a, %bb206), ptr undef, align 436  indirectbr ptr undef, [label %bb439, label %bb85]37 38bb206:                                            ; preds = %bb39  %tmp = getelementptr [499 x i32], ptr @fp_dh_36985b17790d59a27994eaab5dcb00ee, i32 0, i32 undef40  %tmp207 = load i32, ptr %tmp41  %tmp208 = add i32 %tmp207, 142  %tmp209 = inttoptr i32 %tmp208 to ptr43  indirectbr ptr %tmp209, [label %bb213]44 45bb213:                                            ; preds = %bb20646  %tmp214 = load i32, ptr @fp_dh_18716afa4a5354de0a302c8edb3b0ee1, align 447  %tmp215 = load ptr, ptr @fp_dh_20a33cdeefab8f4c8887e82766cb9dcb, align 448  %tmp216 = urem i32 -717428541, %tmp21449  %tmp217 = getelementptr i8, ptr %tmp215, i32 %tmp21650  %tmp219 = load i32, ptr %tmp217, align 451  store i32 %tmp219, ptr undef, align 452  %tmp220 = select i1 false, i32 359373646, i32 167723795553  %tmp221 = add i32 %tmp220, 054  indirectbr ptr undef, [label %bb432, label %bb222]55 56bb222:                                            ; preds = %bb21357  %tmp224 = load i32, ptr undef, align 458  %tmp225 = load i32, ptr undef, align 459  %tmp226 = xor i32 %tmp225, %tmp22460  %tmp227 = shl i32 %tmp226, 161  %tmp228 = and i32 %tmp227, -204888033462  %tmp229 = sub i32 0, %tmp22863  %tmp230 = add i32 0, %tmp22964  %tmp231 = xor i32 %tmp230, 105935622765  %tmp232 = mul i32 %tmp231, 160374472166  %tmp233 = urem i32 %tmp232, 25967  %tmp234 = getelementptr [259 x i8], ptr getelementptr inbounds ([5419648 x i8], ptr @fp_dh_9d93c897906e39883c58b034c8e786b2, i32 0, i32 2039075), i32 0, i32 %tmp23368  %tmp235 = load i8, ptr %tmp234, align 169  %tmp236 = add i32 %tmp233, 270  %tmp237 = getelementptr [264 x i8], ptr getelementptr inbounds ([5419648 x i8], ptr @fp_dh_9d93c897906e39883c58b034c8e786b2, i32 0, i32 3388166), i32 0, i32 %tmp23671  %tmp238 = load i8, ptr %tmp237, align 172  %tmp239 = getelementptr [265 x i8], ptr getelementptr inbounds ([5419648 x i8], ptr @fp_dh_9d93c897906e39883c58b034c8e786b2, i32 0, i32 1325165), i32 0, i32 073  %tmp240 = load i8, ptr %tmp239, align 174  %tmp241 = add i32 %tmp233, 675  %tmp242 = trunc i32 %tmp241 to i876  %tmp243 = mul i8 %tmp242, -377  %tmp244 = add i8 %tmp243, 378  %tmp245 = mul i8 %tmp242, -679  %tmp246 = and i8 %tmp245, 680  %tmp247 = sub i8 0, %tmp24681  %tmp248 = add i8 %tmp244, %tmp24782  %tmp249 = load i8, ptr undef, align 183  %tmp250 = xor i8 %tmp235, 1784  %tmp251 = xor i8 %tmp250, %tmp23885  %tmp252 = xor i8 %tmp251, %tmp24086  %tmp253 = xor i8 %tmp252, %tmp24987  %tmp254 = xor i8 %tmp253, %tmp24888  %tmp255 = zext i8 %tmp254 to i1689  %tmp256 = shl nuw i16 %tmp255, 890  %tmp257 = load i8, ptr null, align 191  %tmp258 = load i32, ptr @fp_dh_18716afa4a5354de0a302c8edb3b0ee1, align 492  %tmp259 = load ptr, ptr @fp_dh_20a33cdeefab8f4c8887e82766cb9dcb, align 493  %tmp260 = urem i32 -717428541, %tmp25894  %tmp261 = getelementptr i8, ptr %tmp259, i32 %tmp26095  %tmp263 = load i32, ptr %tmp261, align 496  %tmp264 = xor i32 %tmp263, 097  %tmp265 = shl i32 %tmp264, 198  %tmp266 = and i32 %tmp265, -131211983299  %tmp267 = sub i32 0, %tmp266100  %tmp268 = add i32 0, %tmp267101  %tmp269 = xor i32 %tmp268, 623994670102  %tmp270 = mul i32 %tmp269, 1603744721103  %tmp271 = urem i32 %tmp270, 259104  %tmp274 = add i32 %tmp271, 3105  %tmp275 = getelementptr [265 x i8], ptr getelementptr inbounds ([5419648 x i8], ptr @fp_dh_9d93c897906e39883c58b034c8e786b2, i32 0, i32 1325165), i32 0, i32 %tmp274106  %tmp276 = load i8, ptr %tmp275, align 1107  %tmp277 = add i32 %tmp271, 6108  %tmp278 = trunc i32 %tmp277 to i8109  %tmp279 = mul i8 %tmp278, -3110  %tmp280 = add i8 %tmp279, 31111  %tmp281 = add i8 %tmp280, 0112  %tmp282 = xor i8 %tmp257, 13113  %tmp283 = xor i8 %tmp282, 0114  %tmp284 = xor i8 %tmp283, 0115  %tmp285 = xor i8 %tmp284, %tmp276116  %tmp286 = xor i8 %tmp285, %tmp281117  %tmp287 = zext i8 %tmp286 to i16118  %tmp288 = or i16 %tmp287, %tmp256119  %tmp289 = xor i16 %tmp288, 14330120  %tmp290 = add i16 0, %tmp289121  %tmp291 = add i16 %tmp290, -14330122  %tmp292 = zext i16 %tmp291 to i32123  %tmp293 = add i16 %tmp290, -14330124  %tmp294 = lshr i16 %tmp293, 12125  %tmp295 = zext i16 %tmp294 to i32126  %tmp296 = sub i32 0, %tmp295127  %tmp297 = xor i32 %tmp296, 16128  %tmp298 = add i32 0, %tmp297129  %tmp299 = and i32 %tmp298, 31130  %tmp300 = and i32 %tmp292, 30864131  %tmp301 = shl i32 %tmp300, %tmp299132  %tmp302 = xor i32 0, %tmp301133  %tmp303 = add i32 0, %tmp302134  %tmp304 = and i32 %tmp298, 31135  %tmp305 = and i32 %tmp303, 25568136  %tmp306 = lshr i32 %tmp305, %tmp304137  %tmp307 = xor i32 0, %tmp306138  %tmp308 = add i32 0, %tmp307139  %tmp309 = trunc i32 %tmp308 to i16140  %tmp310 = shl i16 %tmp309, 1141  %tmp311 = and i16 %tmp310, -4648142  %tmp312 = shl i16 %tmp309, 1143  %tmp313 = and i16 %tmp312, 4646144  %tmp314 = xor i16 %tmp311, 17700145  %tmp315 = xor i16 %tmp313, 17700146  %tmp316 = add i16 %tmp314, %tmp315147  %tmp317 = and i16 %tmp314, %tmp315148  %tmp318 = shl nuw i16 %tmp317, 1149  %tmp319 = sub i16 0, %tmp318150  %tmp320 = add i16 %tmp316, %tmp319151  %tmp321 = and i16 %tmp320, 29906152  %tmp322 = xor i16 %tmp309, 14953153  %tmp323 = add i16 0, %tmp322154  %tmp324 = sub i16 0, %tmp321155  %tmp325 = xor i16 %tmp324, %tmp323156  %tmp326 = add i16 0, %tmp325157  %tmp327 = add i32 %tmp221, 1161362661158  %tmp333 = icmp eq i16 %tmp326, 14953159  %tmp334 = add i32 %tmp327, -1456704142160  %tmp335 = zext i1 %tmp333 to i32161  %tmp336 = add i32 %tmp334, %tmp335162  %tmp337 = getelementptr [499 x i32], ptr @fp_dh_36985b17790d59a27994eaab5dcb00ee, i32 0, i32 %tmp336163  %tmp338 = load i32, ptr %tmp337164  %tmp339 = add i32 %tmp338, 1165  %tmp340 = inttoptr i32 %tmp339 to ptr166  indirectbr ptr %tmp340, [label %bb85, label %bb439]167 168bb432:                                            ; preds = %bb432, %bb213169  %tmp433 = phi i32 [ %tmp221, %bb213 ], [ %tmp433, %bb432 ]170  %tmp434 = add i32 %tmp433, 1022523279171  %tmp435 = getelementptr [499 x i32], ptr @fp_dh_36985b17790d59a27994eaab5dcb00ee, i32 0, i32 %tmp434172  %tmp436 = load i32, ptr %tmp435173  %tmp437 = add i32 %tmp436, 1174  %tmp438 = inttoptr i32 %tmp437 to ptr175  indirectbr ptr %tmp438, [label %bb432]176 177bb439:                                            ; preds = %bb222, %bb85178  ret void179}180 181attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }182