CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
60 lines
2.2 KiB
LLVM
60 lines
2.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
|
|
; RUN: opt < %s -passes=infer-alignment -S | FileCheck %s
|
|
|
|
; ------------------------------------------------------------------------------
|
|
; Scalar type
|
|
; ------------------------------------------------------------------------------
|
|
|
|
define void @alloca_local(i8 %x, i32 %y) {
|
|
; CHECK-LABEL: define void @alloca_local
|
|
; CHECK-SAME: (i8 [[X:%.*]], i32 [[Y:%.*]]) {
|
|
; CHECK-NEXT: [[ALLOCA:%.*]] = alloca i32, align 4
|
|
; CHECK-NEXT: [[LOAD_I8:%.*]] = load i8, ptr [[ALLOCA]], align 4
|
|
; CHECK-NEXT: [[LOAD_I32:%.*]] = load i32, ptr [[ALLOCA]], align 4
|
|
; CHECK-NEXT: store i8 [[X]], ptr [[ALLOCA]], align 4
|
|
; CHECK-NEXT: store i32 [[Y]], ptr [[ALLOCA]], align 4
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%alloca = alloca i32, align 1
|
|
|
|
%load.i8 = load i8, ptr %alloca, align 1
|
|
%load.i32 = load i32, ptr %alloca, align 1
|
|
|
|
store i8 %x, ptr %alloca, align 1
|
|
store i32 %y, ptr %alloca, align 1
|
|
|
|
ret void
|
|
}
|
|
|
|
; ------------------------------------------------------------------------------
|
|
; Struct type
|
|
; ------------------------------------------------------------------------------
|
|
|
|
%struct.pair = type { { i32, i32 }, { i32, i32 } }
|
|
|
|
define void @alloca_struct(i32 %x) {
|
|
; CHECK-LABEL: define void @alloca_struct
|
|
; CHECK-SAME: (i32 [[X:%.*]]) {
|
|
; CHECK-NEXT: [[ALLOCA_STRUCT:%.*]] = alloca [[STRUCT_PAIR:%.*]], align 8
|
|
; CHECK-NEXT: [[GEP_0:%.*]] = getelementptr [[STRUCT_PAIR]], ptr [[ALLOCA_STRUCT]], i64 0, i32 1
|
|
; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr { i32, i32 }, ptr [[GEP_0]], i64 0, i32 1
|
|
; CHECK-NEXT: [[LOAD_2:%.*]] = load i32, ptr [[GEP_0]], align 8
|
|
; CHECK-NEXT: store i32 0, ptr [[GEP_0]], align 8
|
|
; CHECK-NEXT: [[LOAD_1:%.*]] = load i32, ptr [[GEP_1]], align 4
|
|
; CHECK-NEXT: store i32 0, ptr [[GEP_1]], align 4
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%alloca.struct = alloca %struct.pair
|
|
|
|
%gep.0 = getelementptr %struct.pair, ptr %alloca.struct, i64 0, i32 1
|
|
%gep.1 = getelementptr { i32, i32 }, ptr %gep.0, i64 0, i32 1
|
|
|
|
%load.2 = load i32, ptr %gep.0, align 1
|
|
store i32 0, ptr %gep.0, align 1
|
|
|
|
%load.1 = load i32, ptr %gep.1, align 1
|
|
store i32 0, ptr %gep.1, align 1
|
|
|
|
ret void
|
|
}
|