brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 2b499fe Raw
80 lines · plain
1; RUN: llc -mtriple=hexagon < %s2; REQUIRES: asserts3 4; This code causes multiple endloop instructions to be generated for the5; same loop. The findLoopInstr would encounter for one endloop would encounter6; the other endloop, and return null in response. This resulted in a crash.7;8; Check that with the fix we are able to compile this code successfully.9 10target triple = "hexagon"11 12; Function Attrs: norecurse13define void @fred() local_unnamed_addr #0 align 2 {14b0:15  br label %b716 17b1:                                               ; preds = %b918  br i1 undef, label %b4, label %b219 20b2:                                               ; preds = %b121  %v3 = sub i32 undef, undef22  br label %b423 24b4:                                               ; preds = %b2, %b125  %v5 = phi i32 [ undef, %b1 ], [ %v3, %b2 ]26  br i1 undef, label %b14, label %b627 28b6:                                               ; preds = %b429  br label %b1030 31b7:                                               ; preds = %b032  br i1 undef, label %b9, label %b833 34b8:                                               ; preds = %b735  unreachable36 37b9:                                               ; preds = %b738  br label %b139 40b10:                                              ; preds = %b21, %b641  %v11 = phi i32 [ %v22, %b21 ], [ %v5, %b6 ]42  br i1 undef, label %b21, label %b1243 44b12:                                              ; preds = %b1045  br label %b1546 47b13:                                              ; preds = %b2148  br label %b1449 50b14:                                              ; preds = %b13, %b451  ret void52 53b15:                                              ; preds = %b1254  br i1 undef, label %b16, label %b1755 56b16:                                              ; preds = %b1557  store i32 0, ptr undef, align 458  br label %b2159 60b17:                                              ; preds = %b1561  br label %b1862 63b18:                                              ; preds = %b1764  br i1 undef, label %b19, label %b2065 66b19:                                              ; preds = %b1867  br label %b2168 69b20:                                              ; preds = %b1870  store i32 0, ptr undef, align 471  br label %b2172 73b21:                                              ; preds = %b20, %b19, %b16, %b1074  %v22 = add i32 %v11, -875  %v23 = icmp eq i32 %v22, 076  br i1 %v23, label %b13, label %b1077}78 79attributes #0 = { norecurse "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }80