Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/PowerPC/fast-isel-fold.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

131 lines
2.4 KiB
LLVM

; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr7 | FileCheck %s --check-prefix=PPC64
@a = global i8 1, align 1
@b = global i16 2, align 2
@c = global i32 4, align 4
define void @t1() nounwind {
; PPC64: t1
%1 = load i8, ptr @a, align 1
call void @foo1(i8 zeroext %1)
; PPC64: lbz
; PPC64-NOT: rldicl
; PPC64-NOT: rlwinm
ret void
}
define void @t2() nounwind {
; PPC64: t2
%1 = load i16, ptr @b, align 2
call void @foo2(i16 zeroext %1)
; PPC64: lhz
; PPC64-NOT: rldicl
; PPC64-NOT: rlwinm
ret void
}
define void @t2a() nounwind {
; PPC64: t2a
%1 = load i32, ptr @c, align 4
call void @foo3(i32 zeroext %1)
; PPC64: lwz
; PPC64-NOT: rldicl
; PPC64-NOT: rlwinm
ret void
}
declare void @foo1(i8 zeroext)
declare void @foo2(i16 zeroext)
declare void @foo3(i32 zeroext)
define i32 @t3() nounwind {
; PPC64: t3
%1 = load i8, ptr @a, align 1
%2 = zext i8 %1 to i32
; PPC64: lbz
; PPC64-NOT: rlwinm
ret i32 %2
}
define i32 @t4() nounwind {
; PPC64: t4
%1 = load i16, ptr @b, align 2
%2 = zext i16 %1 to i32
; PPC64: lhz
; PPC64-NOT: rlwinm
ret i32 %2
}
define i32 @t5() nounwind {
; PPC64: t5
%1 = load i16, ptr @b, align 2
%2 = sext i16 %1 to i32
; PPC64: lha
; PPC64-NOT: rlwinm
ret i32 %2
}
define i32 @t6() nounwind {
; PPC64: t6
%1 = load i8, ptr @a, align 2
%2 = sext i8 %1 to i32
; PPC64: lbz
; PPC64-NOT: rlwinm
ret i32 %2
}
define i64 @t7() nounwind {
; PPC64: t7
%1 = load i8, ptr @a, align 1
%2 = zext i8 %1 to i64
; PPC64: lbz
; PPC64-NOT: rldicl
ret i64 %2
}
define i64 @t8() nounwind {
; PPC64: t8
%1 = load i16, ptr @b, align 2
%2 = zext i16 %1 to i64
; PPC64: lhz
; PPC64-NOT: rldicl
ret i64 %2
}
define i64 @t9() nounwind {
; PPC64: t9
%1 = load i16, ptr @b, align 2
%2 = sext i16 %1 to i64
; PPC64: lha
; PPC64-NOT: extsh
ret i64 %2
}
define i64 @t10() nounwind {
; PPC64: t10
%1 = load i8, ptr @a, align 2
%2 = sext i8 %1 to i64
; PPC64: lbz
; PPC64: extsb
ret i64 %2
}
define i64 @t11() nounwind {
; PPC64: t11
%1 = load i32, ptr @c, align 4
%2 = zext i32 %1 to i64
; PPC64: lwz
; PPC64-NOT: rldicl
ret i64 %2
}
define i64 @t12() nounwind {
; PPC64: t12
%1 = load i32, ptr @c, align 4
%2 = sext i32 %1 to i64
; PPC64: lwa
; PPC64-NOT: extsw
ret i64 %2
}