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

86 lines
2.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -verify-machineinstrs -mtriple powerpc64le -mcpu=pwr9 | FileCheck %s
; RUN: llc < %s -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -vec-extabi -mcpu=pwr9 | FileCheck %s
; RUN: opt < %s -passes="default<O3>" -S -mtriple powerpc64le -mcpu=pwr9 | FileCheck %s --check-prefix=OPT
define i64 @raw() {
; CHECK-LABEL: raw:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: darn 3, 2
; CHECK-NEXT: blr
entry:
%0 = call i64 @llvm.ppc.darnraw()
ret i64 %0
}
define i64 @conditioned() {
; CHECK-LABEL: conditioned:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: darn 3, 1
; CHECK-NEXT: blr
entry:
%0 = call i64 @llvm.ppc.darn()
ret i64 %0
}
define signext i32 @word() {
; CHECK-LABEL: word:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: darn 3, 0
; CHECK-NEXT: extsw 3, 3
; CHECK-NEXT: blr
entry:
%0 = call i32 @llvm.ppc.darn32()
ret i32 %0
}
define i64 @darn_side_effect() {
; CHECK-LABEL: darn_side_effect:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: darn 3, 2
; CHECK-NEXT: darn 3, 1
; CHECK-NEXT: blr
; OPT-LABEL: @darn_side_effect
; OPT: call i64 @llvm.ppc.darnraw()
; OPT-NEXT: call i64 @llvm.ppc.darn()
entry:
%0 = call i64 @llvm.ppc.darnraw()
%1 = call i64 @llvm.ppc.darn()
ret i64 %1
}
define void @darn_loop(ptr noundef %darn) {
; OPT-LABEL: @darn_loop
; OPT-COUNT-32: tail call i64 @llvm.ppc.darn()
entry:
%inc = alloca i32, align 4
store i32 0, ptr %inc, align 4
br label %cond
cond:
%0 = load i32, ptr %inc, align 4
%cmp = icmp ne i32 %0, 32
br i1 %cmp, label %body, label %end_loop
body:
%1 = call i64 @llvm.ppc.darn()
%2 = load i32, ptr %inc, align 4
%idx = getelementptr inbounds i64, ptr %darn, i32 %2
store i64 %1, ptr %idx, align 8
br label %incr
incr:
%3 = load i32, ptr %inc, align 4
%ninc = add nsw i32 %3, 1
store i32 %ninc, ptr %inc, align 4
br label %cond
end_loop:
ret void
}
declare i64 @llvm.ppc.darn()
declare i64 @llvm.ppc.darnraw()
declare i32 @llvm.ppc.darn32()