Files
TheRock/compiler/amd-llvm/clang/test/CIR/Lowering/local-vars.cpp
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

57 lines
2.2 KiB
C++

// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck -input-file=%t-cir.ll %s
void test() {
int i = 1;
long l = 2l;
float f = 3.0f;
double d = 4.0;
bool b1 = true;
bool b2 = false;
const int ci = 1;
const long cl = 2l;
const float cf = 3.0f;
const double cd = 4.0;
const bool cb1 = true;
const bool cb2 = false;
int uii;
long uil;
float uif;
double uid;
bool uib;
}
// Note: The alignment of i64 stores below is wrong. That should be fixed
// when we add alignment attributes to the load/store ops.
// CHECK: define{{.*}} void @_Z4testv()
// CHECK: %[[I_PTR:.*]] = alloca i32, i64 1, align 4
// CHECK: %[[L_PTR:.*]] = alloca i64, i64 1, align 8
// CHECK: %[[F_PTR:.*]] = alloca float, i64 1, align 4
// CHECK: %[[D_PTR:.*]] = alloca double, i64 1, align 8
// CHECK: %[[B1_PTR:.*]] = alloca i8, i64 1, align 1
// CHECK: %[[B2_PTR:.*]] = alloca i8, i64 1, align 1
// CHECK: %[[CI_PTR:.*]] = alloca i32, i64 1, align 4
// CHECK: %[[CL_PTR:.*]] = alloca i64, i64 1, align 8
// CHECK: %[[CF_PTR:.*]] = alloca float, i64 1, align 4
// CHECK: %[[CD_PTR:.*]] = alloca double, i64 1, align 8
// CHECK: %[[CB1_PTR:.*]] = alloca i8, i64 1, align 1
// CHECK: %[[CB2_PTR:.*]] = alloca i8, i64 1, align 1
// CHECK: %[[UII_PTR:.*]] = alloca i32, i64 1, align 4
// CHECK: %[[UIL_PTR:.*]] = alloca i64, i64 1, align 8
// CHECK: %[[UIF_PTR:.*]] = alloca float, i64 1, align 4
// CHECK: %[[UID_PTR:.*]] = alloca double, i64 1, align 8
// CHECK: %[[UIB_PTR:.*]] = alloca i8, i64 1, align 1
// CHECK: store i32 1, ptr %[[I_PTR]], align 4
// CHECK: store i64 2, ptr %[[L_PTR]], align 8
// CHECK: store float 3.000000e+00, ptr %[[F_PTR]], align 4
// CHECK: store double 4.000000e+00, ptr %[[D_PTR]], align 8
// CHECK: store i8 1, ptr %[[B1_PTR]], align 1
// CHECK: store i8 0, ptr %[[B2_PTR]], align 1
// CHECK: store i32 1, ptr %[[CI_PTR]], align 4
// CHECK: store i64 2, ptr %[[CL_PTR]], align 8
// CHECK: store float 3.000000e+00, ptr %[[CF_PTR]], align 4
// CHECK: store double 4.000000e+00, ptr %[[CD_PTR]], align 8
// CHECK: store i8 1, ptr %[[CB1_PTR]], align 1
// CHECK: store i8 0, ptr %[[CB2_PTR]], align 1