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

75 lines
2.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -O2 | FileCheck %s
; Test for issue #160612: OR conditions in branches should use multiple branches
; instead of materializing booleans with SETCC when no special optimizations apply.
declare void @subroutine_foo()
declare void @subroutine_bar()
; Original issue: (x == 0 || y == 0) was generating SETCC + TEST + BRANCH
; instead of using two conditional branches directly.
define void @func_a(i32 noundef %x, i32 noundef %y) {
; CHECK-LABEL: func_a:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %edi, %edi
; CHECK-NEXT: je subroutine_foo@PLT # TAILCALL
; CHECK-NEXT: # %bb.1: # %entry
; CHECK-NEXT: testl %esi, %esi
; CHECK-NEXT: jne subroutine_bar@PLT # TAILCALL
; CHECK-NEXT: # %bb.2: # %if.then
; CHECK-NEXT: jmp subroutine_foo@PLT # TAILCALL
entry:
%cmp = icmp eq i32 %x, 0
%cmp1 = icmp eq i32 %y, 0
%or.cond = or i1 %cmp, %cmp1
br i1 %or.cond, label %if.then, label %if.else
if.then:
tail call void @subroutine_foo()
br label %if.end
if.else:
tail call void @subroutine_bar()
br label %if.end
if.end:
ret void
}
; Reference implementation that already generated optimal code.
; This should continue to generate the same optimal code.
define void @func_b(i32 noundef %x, i32 noundef %y) {
; CHECK-LABEL: func_b:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: testl %edi, %edi
; CHECK-NEXT: je subroutine_foo@PLT # TAILCALL
; CHECK-NEXT: # %bb.1: # %if.else
; CHECK-NEXT: testl %esi, %esi
; CHECK-NEXT: je subroutine_foo@PLT # TAILCALL
; CHECK-NEXT: # %bb.2: # %if.else3
; CHECK-NEXT: jmp subroutine_bar@PLT # TAILCALL
entry:
%cmp = icmp eq i32 %x, 0
br i1 %cmp, label %if.then, label %if.else
if.then:
tail call void @subroutine_foo()
br label %if.end4
if.else:
%cmp1 = icmp eq i32 %y, 0
br i1 %cmp1, label %if.then2, label %if.else3
if.then2:
tail call void @subroutine_foo()
br label %if.end4
if.else3:
tail call void @subroutine_bar()
br label %if.end4
if.end4:
ret void
}