Files
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

205 lines
6.4 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
; RUN: -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s | FileCheck %s
@val = external local_unnamed_addr global i32, align 4
declare i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double>)
define dso_local signext i32 @xvtsqrtdp_and_1_eq(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_1_eq:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: bnu cr0, .LBB0_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB0_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 1
%cmp.not = icmp eq i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_2_eq(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_2_eq:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: bne cr0, .LBB1_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB1_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 2
%cmp.not = icmp eq i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_4_eq(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_4_eq:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: ble cr0, .LBB2_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB2_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 4
%cmp.not = icmp eq i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_8_eq(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_8_eq:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: bge cr0, .LBB3_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB3_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 8
%cmp.not = icmp eq i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_1_ne(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_1_ne:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: bun cr0, .LBB4_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB4_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 1
%cmp.not = icmp ne i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_2_ne(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_2_ne:
; CHECK: # %bb.0: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_4_ne(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_4_ne:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: bgt cr0, .LBB6_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB6_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 4
%cmp.not = icmp ne i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}
define dso_local signext i32 @xvtsqrtdp_and_8_ne(<2 x double> %input) {
; CHECK-LABEL: xvtsqrtdp_and_8_ne:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtsqrtdp cr0, v2
; CHECK-NEXT: blt cr0, .LBB7_2
; CHECK-NEXT: # %bb.1: # %if.then
; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
; CHECK-NEXT: li r4, 100
; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
; CHECK-NEXT: stw r4, 0(r3)
; CHECK-NEXT: .LBB7_2: # %if.end
; CHECK-NEXT: li r3, 1
; CHECK-NEXT: blr
entry:
%0 = tail call i32 @llvm.ppc.vsx.xvtsqrtdp(<2 x double> %input)
%1 = and i32 %0, 8
%cmp.not = icmp ne i32 %1, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %entry
store i32 100, ptr @val, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
ret i32 1
}