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
92 lines
2.9 KiB
LLVM
92 lines
2.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+nf | FileCheck %s
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+nf -x86-enable-apx-for-relocation=true | FileCheck %s
|
|
|
|
define i32 @flag_copy_1(i32 %x, i32 %y, ptr %pz) nounwind {
|
|
; CHECK-LABEL: flag_copy_1:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: movq %rdx, %rcx
|
|
; CHECK-NEXT: movl %edi, %eax
|
|
; CHECK-NEXT: mull %esi
|
|
; CHECK-NEXT: movl (%rcx), %ecx
|
|
; CHECK-NEXT: {nf} addl %eax, %ecx
|
|
; CHECK-NEXT: cmovol %ecx, %eax
|
|
; CHECK-NEXT: retq
|
|
%o = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %x, i32 %y)
|
|
%v1 = extractvalue { i32, i1 } %o, 1
|
|
%v2 = extractvalue { i32, i1 } %o, 0
|
|
%z = load i32, ptr %pz
|
|
%a = add i32 %v2, %z
|
|
%r = select i1 %v1, i32 %a, i32 %v2
|
|
ret i32 %r
|
|
}
|
|
|
|
declare <2 x i128> @llvm.ssub.sat.v2i128(<2 x i128>, <2 x i128>)
|
|
|
|
define <2 x i128> @flag_copy_2(<2 x i128> %x, <2 x i128> %y) nounwind {
|
|
; CHECK-LABEL: flag_copy_2:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: movq %rdi, %rax
|
|
; CHECK-NEXT: subq {{[0-9]+}}(%rsp), %rcx
|
|
; CHECK-NEXT: sbbq {{[0-9]+}}(%rsp), %r8
|
|
; CHECK-NEXT: movq %r8, %rdi
|
|
; CHECK-NEXT: {nf} sarq $63, %rdi
|
|
; CHECK-NEXT: cmovoq %rdi, %rcx
|
|
; CHECK-NEXT: movabsq $-9223372036854775808, %r10 # imm = 0x8000000000000000
|
|
; CHECK-NEXT: {nf} xorq %r10, %rdi
|
|
; CHECK-NEXT: cmovnoq %r8, %rdi
|
|
; CHECK-NEXT: subq %r9, %rsi
|
|
; CHECK-NEXT: sbbq {{[0-9]+}}(%rsp), %rdx
|
|
; CHECK-NEXT: movq %rdx, %r8
|
|
; CHECK-NEXT: {nf} sarq $63, %r8
|
|
; CHECK-NEXT: cmovoq %r8, %rsi
|
|
; CHECK-NEXT: {nf} xorq %r10, %r8
|
|
; CHECK-NEXT: cmovnoq %rdx, %r8
|
|
; CHECK-NEXT: movq %rcx, 16(%rax)
|
|
; CHECK-NEXT: movq %rsi, (%rax)
|
|
; CHECK-NEXT: movq %rdi, 24(%rax)
|
|
; CHECK-NEXT: movq %r8, 8(%rax)
|
|
; CHECK-NEXT: retq
|
|
%z = call <2 x i128> @llvm.ssub.sat.v2i128(<2 x i128> %x, <2 x i128> %y)
|
|
ret <2 x i128> %z
|
|
}
|
|
|
|
; TODO: Remove the 2nd cmpl by using NF imul.
|
|
define void @flag_copy_3(i32 %x, i32 %y, ptr %pa, ptr %pb, ptr %pc) nounwind {
|
|
; CHECK-LABEL: flag_copy_3:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: # kill: def $esi killed $esi def $rsi
|
|
; CHECK-NEXT: cmpl $2, %edi
|
|
; CHECK-NEXT: jl .LBB2_2
|
|
; CHECK-NEXT: # %bb.1: # %bb1
|
|
; CHECK-NEXT: movl %edi, %eax
|
|
; CHECK-NEXT: imull %esi, %eax
|
|
; CHECK-NEXT: movl %eax, (%rdx)
|
|
; CHECK-NEXT: jmp .LBB2_3
|
|
; CHECK-NEXT: .LBB2_2: # %bb2
|
|
; CHECK-NEXT: leal -2(%rsi), %eax
|
|
; CHECK-NEXT: movl %eax, (%rcx)
|
|
; CHECK-NEXT: .LBB2_3: # %bb3
|
|
; CHECK-NEXT: cmpl $2, %edi
|
|
; CHECK-NEXT: cmovgel %edi, %esi
|
|
; CHECK-NEXT: movl %esi, (%r8)
|
|
; CHECK-NEXT: retq
|
|
entry:
|
|
%cmp = icmp sgt i32 %x, 1
|
|
br i1 %cmp, label %bb1, label %bb2
|
|
bb1:
|
|
%add = mul nuw nsw i32 %x, %y
|
|
store i32 %add, ptr %pa
|
|
br label %bb3
|
|
|
|
bb2:
|
|
%sub = sub nuw nsw i32 %y, 2
|
|
store i32 %sub, ptr %pb
|
|
br label %bb3
|
|
|
|
bb3:
|
|
%s = select i1 %cmp, i32 %x, i32 %y
|
|
store i32 %s, ptr %pc
|
|
ret void
|
|
}
|