Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/PowerPC/ppc64-abi-extend.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

98 lines
2.2 KiB
LLVM

; Verify that i32 argument/return values are extended to i64
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
@si = common global i32 0, align 4
@ui = common global i32 0, align 4
declare void @arg_si(i32 signext)
declare void @arg_ui(i32 zeroext)
declare signext i32 @ret_si()
declare zeroext i32 @ret_ui()
define void @pass_arg_si() nounwind {
entry:
%0 = load i32, ptr @si, align 4
tail call void @arg_si(i32 signext %0) nounwind
ret void
}
; CHECK: @pass_arg_si
; CHECK: lwa 3,
; CHECK: bl arg_si
define void @pass_arg_ui() nounwind {
entry:
%0 = load i32, ptr @ui, align 4
tail call void @arg_ui(i32 zeroext %0) nounwind
ret void
}
; CHECK: @pass_arg_ui
; CHECK: lwz 3,
; CHECK: bl arg_ui
define i64 @use_arg_si(i32 signext %x) nounwind readnone {
entry:
%conv = sext i32 %x to i64
ret i64 %conv
}
; CHECK: @use_arg_si
; CHECK: %entry
; CHECK-NEXT: blr
define i64 @use_arg_ui(i32 zeroext %x) nounwind readnone {
entry:
%conv = zext i32 %x to i64
ret i64 %conv
}
; CHECK: @use_arg_ui
; CHECK: %entry
; CHECK-NEXT: blr
define signext i32 @pass_ret_si() nounwind readonly {
entry:
%0 = load i32, ptr @si, align 4
ret i32 %0
}
; CHECK: @pass_ret_si
; CHECK: lwa 3,
; CHECK: blr
define zeroext i32 @pass_ret_ui() nounwind readonly {
entry:
%0 = load i32, ptr @ui, align 4
ret i32 %0
}
; CHECK: @pass_ret_ui
; CHECK: lwz 3,
; CHECK: blr
define i64 @use_ret_si() nounwind {
entry:
%call = tail call signext i32 @ret_si() nounwind
%conv = sext i32 %call to i64
ret i64 %conv
}
; CHECK: @use_ret_si
; CHECK: bl ret_si
; This is to verify the return register (3) set up by the ret_si
; call is passed on unmodified as return value of use_ret_si.
; CHECK-NOT: 3
; CHECK: blr
define i64 @use_ret_ui() nounwind {
entry:
%call = tail call zeroext i32 @ret_ui() nounwind
%conv = zext i32 %call to i64
ret i64 %conv
}
; CHECK: @use_ret_ui
; CHECK: bl ret_ui
; This is to verify the return register (3) set up by the ret_ui
; call is passed on unmodified as return value of use_ret_ui.
; CHECK-NOT: 3
; CHECK: blr