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
38 lines
2.0 KiB
Plaintext
38 lines
2.0 KiB
Plaintext
// REQUIRES: amdgpu-registered-target
|
|
// RUN: %clang -cl-std=clc++2021 -emit-llvm -g -O0 -S -nogpulib -target amdgcn-amd-amdhsa -mcpu=fiji -o - %s | FileCheck %s
|
|
|
|
// Test that the special case in EmitGlobalVariableForHeterogeneousDwarf
|
|
// handles nullptr constants when the are actually folded. This is reduced from
|
|
// a case which previously crashed the compiler, and the typedef is seemingly
|
|
// required to get Clang to actually fold the constant in this case.
|
|
|
|
// CHECK: !DIGlobalVariableExpression(var: [[VAR_GLOBAL:![0-9]+]], expr: !DIExpression(DIOpConstant(i64 0)))
|
|
// CHECK: [[VAR_GLOBAL]] = distinct !DIGlobalVariable(name: "null_global_ptr"
|
|
typedef global int *global_ptr;
|
|
const global_ptr null_global_ptr = nullptr;
|
|
bool isnull(global_ptr p) { return p == null_global_ptr; }
|
|
|
|
// CHECK: !DIGlobalVariableExpression(var: [[VAR_PRIVATE:![0-9]+]], expr: !DIExpression(DIOpConstant(i32 -1)))
|
|
// CHECK: [[VAR_PRIVATE]] = distinct !DIGlobalVariable(name: "null_private_ptr"
|
|
typedef private int *private_ptr;
|
|
const private_ptr null_private_ptr = nullptr;
|
|
bool isnull(private_ptr p) { return p == null_private_ptr; }
|
|
|
|
// CHECK: !DIGlobalVariableExpression(var: [[VAR_CONSTANT:![0-9]+]], expr: !DIExpression(DIOpConstant(i64 0)))
|
|
// CHECK: [[VAR_CONSTANT]] = distinct !DIGlobalVariable(name: "null_constant_ptr"
|
|
typedef constant int *constant_ptr;
|
|
const constant_ptr null_constant_ptr = nullptr;
|
|
bool isnull(constant_ptr p) { return p == null_constant_ptr; }
|
|
|
|
// CHECK: !DIGlobalVariableExpression(var: [[VAR_LOCAL:![0-9]+]], expr: !DIExpression(DIOpConstant(i32 -1)))
|
|
// CHECK: [[VAR_LOCAL]] = distinct !DIGlobalVariable(name: "null_local_ptr"
|
|
typedef local int *local_ptr;
|
|
const local_ptr null_local_ptr = nullptr;
|
|
bool isnull(local_ptr p) { return p == null_local_ptr; }
|
|
|
|
// CHECK: !DIGlobalVariableExpression(var: [[VAR_GENERIC:![0-9]+]], expr: !DIExpression(DIOpConstant(i64 0)))
|
|
// CHECK: [[VAR_GENERIC]] = distinct !DIGlobalVariable(name: "null_generic_ptr"
|
|
typedef int *generic_ptr;
|
|
const generic_ptr null_generic_ptr = nullptr;
|
|
bool isnull(generic_ptr p) { return p == null_generic_ptr; }
|