xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-2011-03-21-Unaligned-Frame-Index.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=arm64 | FileCheck %s
2*9880d681SAndroid Build Coastguard Workerdefine void @foo(i64 %val) {
3*9880d681SAndroid Build Coastguard Worker; CHECK: foo
4*9880d681SAndroid Build Coastguard Worker;   The stack frame store is not 64-bit aligned. Make sure we use an
5*9880d681SAndroid Build Coastguard Worker;   instruction that can handle that.
6*9880d681SAndroid Build Coastguard Worker; CHECK: stur x0, [sp, #20]
7*9880d681SAndroid Build Coastguard Worker  %a = alloca [49 x i32], align 4
8*9880d681SAndroid Build Coastguard Worker  %p32 = getelementptr inbounds [49 x i32], [49 x i32]* %a, i64 0, i64 2
9*9880d681SAndroid Build Coastguard Worker  %p = bitcast i32* %p32 to i64*
10*9880d681SAndroid Build Coastguard Worker  store i64 %val, i64* %p, align 8
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13