Files
TheRock/compiler/amd-llvm/llvm/test/tools/dsymutil/X86/op-convert-offset.test
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

56 lines
2.5 KiB
Plaintext

# To rebuild the test case:
#
# $ cat op-convert-offset0.c
# extern int a[2];
#
# int foo(_Bool b) {
# return b ? a[1] : a[0];
# }
# $ cat op-convert-offset1.c
# int a[2] = {1, 2};
#
# int foo(_Bool);
#
# int main() {
# return foo(0);
# }
# $ xcrun clang -g -O2 -c -target x86_64-apple-unknown-macho op-convert-offset1.c -emit-llvm
# $ xcrun clang -g -O2 -c -target x86_64-apple-unknown-macho op-convert-offset0.c -emit-llvm
# $ llvm-link op-convert-offset1.bc op-convert-offset0.bc -o op-convert-offset.ll -S
# $ xcrun clang -c op-convert-offset.ll -O0 -arch x86_64
# $ xcrun clang -g op-convert-offset.o -O0 -arch x86_64 -o op-convert-offset
RUN: dsymutil --linker classic -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o %t.dSYM 2>&1
RUN: llvm-dwarfdump %p/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1 | FileCheck %s --check-prefix OBJ
RUN: llvm-dwarfdump %t.dSYM 2>&1 | FileCheck %s --check-prefix DSYM
RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs \
RUN: %p/../Inputs/private/tmp/op-convert-offset/op-convert-offset \
RUN: -o %t.dSYM 2>&1
RUN: llvm-dwarfdump \
RUN: %p/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1 \
RUN: | FileCheck %s --check-prefix OBJ
RUN: llvm-dwarfdump %t.dSYM 2>&1 | FileCheck %s --check-prefix DSYM
OBJ: 0x0000007d: DW_TAG_base_type
OBJ: DW_AT_name ("DW_ATE_unsigned_1")
OBJ: DW_AT_encoding (DW_ATE_unsigned)
OBJ: DW_AT_byte_size (0x01)
OBJ: 0x00000094: DW_TAG_formal_parameter
OBJ: DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x0000007d) "DW_ATE_unsigned_1", DW_OP_convert (0x00000081) "DW_ATE_unsigned_8", DW_OP_stack_value)
OBJ: DW_AT_name ("b")
OBJ: DW_AT_type (0x000000af "_Bool")
DSYM: DW_TAG_compile_unit
DSYM: DW_TAG_compile_unit
DSYM: DW_TAG_base_type
DSYM: DW_AT_name ("DW_ATE_unsigned_1")
DSYM: DW_AT_encoding (DW_ATE_unsigned)
DSYM: DW_AT_byte_size (0x01)
DSYM: DW_TAG_formal_parameter
DSYM: DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x00000084) "DW_ATE_unsigned_1", DW_OP_convert (0x00000088) "DW_ATE_unsigned_8", DW_OP_stack_value)
DSYM: DW_AT_name ("b")
DSYM: DW_AT_type ({{.*}} "_Bool")