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

68 lines
2.2 KiB
LLVM

; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
; RUN: -stop-before=finalize-isel -verify-machineinstrs | \
; RUN: FileCheck -check-prefix=BEFORE-FINALIZE-ISEL %s
; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
; RUN: -stop-after=finalize-isel -verify-machineinstrs | \
; RUN: FileCheck -check-prefix=AFTER-FINALIZE-ISEL %s
; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s \
; RUN: -verify-machineinstrs | FileCheck %s
; RUN: llc -mcpu=pwr7 -mtriple=powerpc64le-unknown-linux-gnu < %s \
; RUN: -verify-machineinstrs | FileCheck -check-prefix=CHECK-PWR7 %s
define double @test_setrndi() {
entry:
%0 = tail call double @llvm.ppc.setrnd(i32 2)
ret double %0
; BEFORE-FINALIZE-ISEL: test_setrndi
; BEFORE-FINALIZE-ISEL: SETRNDi 2, implicit-def dead $rm, implicit $rm
; AFTER-FINALIZE-ISEL: test_setrndi
; AFTER-FINALIZE-ISEL: MFFS implicit $rm
; AFTER-FINALIZE-ISEL: MTFSB0 31, implicit-def $rm
; AFTER-FINALIZE-ISEL: MTFSB1 30, implicit-def $rm
; CHECK-LABEL: @test_setrndi
; CHECK: # %bb.0:
; CHECK-DAG: mffs 1
; CHECK-DAG: mtfsb0 31
; CHECK-DAG: mtfsb1 30
; CHECK: blr
}
define double @test_setrnd(i32 signext %x) {
entry:
%0 = tail call double @llvm.ppc.setrnd(i32 %x)
ret double %0
; BEFORE-FINALIZE-ISEL: test_setrnd
; BEFORE-FINALIZE-ISEL: SETRND killed %1, implicit-def dead $rm, implicit $rm
; AFTER-FINALIZE-ISEL: test_setrnd
; AFTER-FINALIZE-ISEL: MFFS implicit $rm
; AFTER-FINALIZE-ISEL: MTFSF 255, %7, 0, 0, implicit-def $rm
; CHECK-LABEL: @test_setrnd
; CHECK: # %bb.0:
; CHECK-DAG: mffs 1
; CHECK-DAG: mffprd [[REG1:[0-9]+]], 1
; CHECK-DAG: rldimi [[REG1]], 3, 0, 62
; CHECK-DAG: mtfprd [[REG2:[0-9]+]], [[REG1]]
; CHECK-DAG: mtfsf 255, [[REG2]]
; CHECK: blr
; CHECK-PWR7-LABEL: @test_setrnd
; CHECK-PWR7: # %bb.0:
; CHECK-PWR7-DAG: mffs 1
; CHECK-PWR7-DAG: stfd 1, -8(1)
; CHECK-PWR7-DAG: ld [[REG1:[0-9]+]], -8(1)
; CHECK-PWR7-DAG: rldimi [[REG1]], 3, 0, 62
; CHECK-PWR7-DAG: std [[REG1]], -16(1)
; CHECK-PWR7-DAG: lfd [[REG2:[0-9]+]], -16(1)
; CHECK-PWR7-DAG: mtfsf 255, [[REG2]]
; CHECK-PWR7: blr
}
declare double @llvm.ppc.setrnd(i32)