Files
clang-p2996/llvm/test/CodeGen/SPARC/data-align.ll
Koakuma dbad963a69 [SPARC] Align i128 to 16 bytes in SPARC datalayouts (#106951)
Align i128s to 16 bytes, following the example at
https://reviews.llvm.org/D86310.

clang already does this implicitly, but do it in backend code too for
the benefit of other frontends (see e.g
https://github.com/llvm/llvm-project/issues/102783 &
https://github.com/rust-lang/rust/issues/128950).
2024-09-30 08:32:33 +07:00

28 lines
646 B
LLVM

; RUN: llc < %s -march=sparc | FileCheck %s
; RUN: llc < %s -march=sparcel | FileCheck %s
; RUN: llc < %s -march=sparcv9 | FileCheck %s
; CHECK: .Li8:
; CHECK-DAG: .size .Li8, 1
@i8 = private constant i8 42
; CHECK: .p2align 1
; CHECK-NEXT: .Li16:
; CHECK-DAG: .size .Li16, 2
@i16 = private constant i16 42
; CHECK: .p2align 2
; CHECK-NEXT: .Li32:
; CHECK-DAG: .size .Li32, 4
@i32 = private constant i32 42
; CHECK: .p2align 3
; CHECK-NEXT: .Li64:
; CHECK-DAG: .size .Li64, 8
@i64 = private constant i64 42
; CHECK: .p2align 4
; CHECK-NEXT: .Li128:
; CHECK-DAG: .size .Li128, 16
@i128 = private constant i128 42