1 ; RUN: llc -mtriple=aarch64-linux-gnu < %s | FileCheck %s
3 ; Reduced test from https://github.com/llvm/llvm-project/issues/60645.
4 ; To check that we are generating -32 as offset for the first store.
6 define ptr @pr60645(ptr %ptr, i64 %t0) {
7 ; CHECK-LABEL: pr60645:
9 ; CHECK-NEXT: sub x8, x0, x1, lsl #2
10 ; CHECK-NEXT: str wzr, [x8, #-32]!
11 ; CHECK-NEXT: stur wzr, [x8, #-8]
13 %t1 = add nuw nsw i64 %t0, 8
15 %t3 = getelementptr i8, ptr %ptr, i64 %t2
16 %t4 = bitcast ptr %t3 to ptr
17 store i32 0, ptr %t4, align 4
19 %t6 = sub nuw nsw i64 -8, %t5
20 %t7 = getelementptr i8, ptr %ptr, i64 %t6
21 %t8 = bitcast ptr %t7 to ptr
22 store i32 0, ptr %t8, align 4