brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 3396a05 Raw
48 lines · plain
1; RUN: llc %s -mtriple=aarch64 -o - | FileCheck %s2 3%struct.A = type { i8, i8, i8, i8, i8, i8, i8, i8, i32 }4 5; The existence of the final i32 value should not prevent the i8s from6; being merged.7 8; CHECK-LABEL: @merge_const_store9; CHECK-NOT: strb10; CHECK: str x8,  [x1]11; CHECK-NOT: strb12; CHECK: str wzr, [x1, #8]13; CHECK-NOT: strb14define void @merge_const_store(i32 %count, ptr nocapture %p)  {15  %1 = icmp sgt i32 %count, 016  br i1 %1, label %.lr.ph, label %._crit_edge17.lr.ph:18  %i.02 = phi i32 [ %add, %.lr.ph ], [ 0, %0 ]19  %.01 = phi ptr [ %addr, %.lr.ph ], [ %p, %0 ]20  store i8 1, ptr %.01, align 121  %a3 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 122  store i8 2, ptr %a3, align 123  %a4 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 224  store i8 3, ptr %a4, align 125  %a5 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 326  store i8 4, ptr %a5, align 127  %a6 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 428  store i8 5, ptr %a6, align 129  %a7 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 530  store i8 6, ptr %a7, align 131  %a8 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 632  store i8 7, ptr %a8, align 133  %a9 = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 734  store i8 8, ptr %a9, align 135 36  ;37  %addr_last = getelementptr inbounds %struct.A, ptr %.01, i64 0, i32 838  store i32 0, ptr %addr_last, align 439 40 41  %add = add nsw i32 %i.02, 142  %addr = getelementptr inbounds %struct.A, ptr %.01, i64 143  %exitcond = icmp eq i32 %add, %count44  br i1 %exitcond, label %._crit_edge, label %.lr.ph45._crit_edge:46  ret void47}48