Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/PowerPC/pr22711.ll
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

80 lines
2.3 KiB
LLVM

; Verify that the .toc section is aligned on an 8-byte boundary.
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
; RUN: -mcpu=pwr8 -filetype=obj -ppc-min-jump-table-entries=4 -o - | llvm-readobj --sections - | FileCheck %s
define void @test(ptr %a) {
entry:
%a.addr = alloca ptr, align 8
store ptr %a, ptr %a.addr, align 8
%0 = load ptr, ptr %a.addr, align 8
%incdec.ptr = getelementptr inbounds i32, ptr %0, i32 1
store ptr %incdec.ptr, ptr %a.addr, align 8
%1 = load i32, ptr %0, align 4
switch i32 %1, label %sw.epilog [
i32 17, label %sw.bb
i32 13, label %sw.bb1
i32 11, label %sw.bb2
i32 7, label %sw.bb3
i32 5, label %sw.bb4
i32 3, label %sw.bb5
i32 2, label %sw.bb6
]
sw.bb: ; preds = %entry
%2 = load ptr, ptr %a.addr, align 8
store i32 2, ptr %2, align 4
br label %sw.epilog
sw.bb1: ; preds = %entry
%3 = load ptr, ptr %a.addr, align 8
store i32 3, ptr %3, align 4
br label %sw.epilog
sw.bb2: ; preds = %entry
%4 = load ptr, ptr %a.addr, align 8
store i32 5, ptr %4, align 4
br label %sw.epilog
sw.bb3: ; preds = %entry
%5 = load ptr, ptr %a.addr, align 8
store i32 7, ptr %5, align 4
br label %sw.epilog
sw.bb4: ; preds = %entry
%6 = load ptr, ptr %a.addr, align 8
store i32 11, ptr %6, align 4
br label %sw.epilog
sw.bb5: ; preds = %entry
%7 = load ptr, ptr %a.addr, align 8
store i32 13, ptr %7, align 4
br label %sw.epilog
sw.bb6: ; preds = %entry
%8 = load ptr, ptr %a.addr, align 8
store i32 17, ptr %8, align 4
br label %sw.epilog
sw.epilog: ; preds = %entry, %sw.bb6, %sw.bb5, %sw.bb4, %sw.bb3, %sw.bb2, %sw.bb1, %sw.bb
ret void
}
; CHECK: Name: .toc
; CHECK: AddressAlignment: 8
; CHECK: Name: .rela.toc
; This test was generated from the following from PR22711:
;void test(int *a) {
; switch (*a++) {
; case 17: *a = 2; break;
; case 13: *a = 3; break;
; case 11: *a = 5; break;
; case 7: *a = 7; break;
; case 5: *a = 11; break;
; case 3: *a = 13; break;
; case 2: *a = 17; break;
; }
;}