brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 56c04c2 Raw
74 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3; Make sure that if there's only one store to the stack, it gets packetized4; with allocframe as there's a latency of 2 cycles between allocframe and5; the following store if not in the same packet.6 7; CHECK: {8; CHECK: memd(r299; CHECK-NOT: {10; CHECK: allocframe11; CHECK: }12; CHECK: = memw(gp+#G)13 14%struct.0 = type { ptr, i32, %struct.2 }15%struct.1 = type { i32, i32, [31 x i8] }16%struct.2 = type { %struct.1 }17 18@G = common global ptr null, align 419 20define i32 @test(ptr nocapture %a0) #0 {21b1:22  %v2 = alloca ptr, align 423  %v5 = load ptr, ptr %a0, align 424  store ptr %v5, ptr %v2, align 425  %v7 = load ptr, ptr @G, align 426  tail call void @llvm.memcpy.p0.p0.i32(ptr align 4 %v5, ptr align 4 %v7, i32 48, i1 false)27  %v8 = getelementptr inbounds %struct.0, ptr %a0, i32 0, i32 2, i32 0, i32 128  store i32 5, ptr %v8, align 429  %v9 = getelementptr inbounds %struct.0, ptr %v5, i32 0, i32 2, i32 0, i32 130  store i32 5, ptr %v9, align 431  %v11 = load i32, ptr %a0, align 432  store i32 %v11, ptr %v5, align 433  %v13 = call i32 @f0(ptr nonnull %v2)34  %v14 = load ptr, ptr %v2, align 435  %v15 = getelementptr inbounds %struct.0, ptr %v14, i32 0, i32 136  %v16 = load i32, ptr %v15, align 437  %v17 = icmp eq i32 %v16, 038  br i1 %v17, label %b18, label %b3239 40b18:                                              ; preds = %b141  %v20 = getelementptr inbounds %struct.0, ptr %v14, i32 0, i32 2, i32 0, i32 142  store i32 6, ptr %v20, align 443  %v21 = getelementptr inbounds %struct.0, ptr %a0, i32 0, i32 2, i32 0, i32 044  %v22 = load i32, ptr %v21, align 445  %v23 = getelementptr inbounds %struct.0, ptr %v14, i32 0, i32 2, i32 0, i32 046  %v24 = call i32 @f1(i32 %v22, ptr %v23)47  %v25 = load ptr, ptr @G, align 448  %v26 = load i32, ptr %v25, align 449  %v27 = load ptr, ptr %v2, align 450  store i32 %v26, ptr %v27, align 451  %v28 = load ptr, ptr %v2, align 452  %v29 = getelementptr inbounds %struct.0, ptr %v28, i32 0, i32 2, i32 0, i32 153  %v30 = load i32, ptr %v29, align 454  %v31 = call i32 @f2(i32 %v30, i32 10, ptr %v29)55  br label %b3656 57b32:                                              ; preds = %b158  %v34 = load ptr, ptr %a0, align 459  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %a0, ptr align 4 %v34, i32 48, i1 false)60  br label %b3661 62b36:                                              ; preds = %b32, %b1863  ret i32 undef64}65 66declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) #167 68declare i32 @f0(...) #069declare i32 @f1(...) #070declare i32 @f2(...) #071 72attributes #0 = { nounwind }73attributes #1 = { argmemonly nounwind }74