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

79 lines
2.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mcpu=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
define double @test(i1 %X) {
; CHECK-LABEL: test:
; CHECK: # %bb.0:
; CHECK-NEXT: andi. 3, 3, 1
; CHECK-NEXT: bc 12, 1, .LBB0_2
; CHECK-NEXT: # %bb.1:
; CHECK-NEXT: li 3, .LCPI0_0@l
; CHECK-NEXT: addis 3, 3, .LCPI0_0@ha
; CHECK-NEXT: lfs 1, 0(3)
; CHECK-NEXT: blr
; CHECK-NEXT: .LBB0_2:
; CHECK-NEXT: li 3, .LCPI0_1@l
; CHECK-NEXT: addis 3, 3, .LCPI0_1@ha
; CHECK-NEXT: lfs 1, 0(3)
; CHECK-NEXT: blr
%Y = uitofp i1 %X to double
ret double %Y
}
; Verify the cases won't crash because of missing chains
@foo = dso_local global double 0.000000e+00, align 8
define double @u1tofp(i1 %i, double %d) #0 {
; CHECK-LABEL: u1tofp:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andi. 3, 3, 1
; CHECK-NEXT: fmr 0, 1
; CHECK-NEXT: bc 12, 1, .LBB1_2
; CHECK-NEXT: # %bb.1: # %entry
; CHECK-NEXT: li 3, .LCPI1_0@l
; CHECK-NEXT: addis 3, 3, .LCPI1_0@ha
; CHECK-NEXT: b .LBB1_3
; CHECK-NEXT: .LBB1_2:
; CHECK-NEXT: li 3, .LCPI1_1@l
; CHECK-NEXT: addis 3, 3, .LCPI1_1@ha
; CHECK-NEXT: .LBB1_3: # %entry
; CHECK-NEXT: lfs 1, 0(3)
; CHECK-NEXT: lis 3, foo@ha
; CHECK-NEXT: stfd 0, foo@l(3)
; CHECK-NEXT: blr
entry:
%conv = tail call double @llvm.experimental.constrained.uitofp.f64.i1(i1 %i, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
store volatile double %d, ptr @foo, align 8
ret double %conv
}
define double @s1tofp(i1 %i, double %d) #0 {
; CHECK-LABEL: s1tofp:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: andi. 3, 3, 1
; CHECK-NEXT: fmr 0, 1
; CHECK-NEXT: bc 12, 1, .LBB2_2
; CHECK-NEXT: # %bb.1: # %entry
; CHECK-NEXT: li 3, .LCPI2_0@l
; CHECK-NEXT: addis 3, 3, .LCPI2_0@ha
; CHECK-NEXT: b .LBB2_3
; CHECK-NEXT: .LBB2_2:
; CHECK-NEXT: li 3, .LCPI2_1@l
; CHECK-NEXT: addis 3, 3, .LCPI2_1@ha
; CHECK-NEXT: .LBB2_3: # %entry
; CHECK-NEXT: lfs 1, 0(3)
; CHECK-NEXT: lis 3, foo@ha
; CHECK-NEXT: stfd 0, foo@l(3)
; CHECK-NEXT: blr
entry:
%conv = tail call double @llvm.experimental.constrained.sitofp.f64.i1(i1 %i, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
store volatile double %d, ptr @foo, align 8
ret double %conv
}
declare double @llvm.experimental.constrained.uitofp.f64.i1(i1, metadata, metadata)
declare double @llvm.experimental.constrained.sitofp.f64.i1(i1, metadata, metadata)
attributes #0 = { strictfp }