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
44 lines
1.5 KiB
LLVM
44 lines
1.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
|
|
define i8 @pr142518(ptr %p, i8 %x, i1 %c) "instcombine-no-verify-fixpoint" {
|
|
; CHECK-LABEL: define i8 @pr142518(
|
|
; CHECK-SAME: ptr [[P:%.*]], i8 [[X:%.*]], i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 [[X]], -1
|
|
; CHECK-NEXT: br label %[[LOOP:.*]]
|
|
; CHECK: [[LOOP]]:
|
|
; CHECK-NEXT: [[NOT1:%.*]] = xor i1 [[CMP1]], true
|
|
; CHECK-NEXT: [[OR:%.*]] = or i1 [[CMP1]], [[NOT1]]
|
|
; CHECK-NEXT: [[CMP:%.*]] = xor i1 [[OR]], true
|
|
; CHECK-NEXT: [[EXT2:%.*]] = zext i1 [[CMP]] to i8
|
|
; CHECK-NEXT: store i8 [[EXT2]], ptr [[P]], align 1
|
|
; CHECK-NEXT: br i1 false, label %[[LOOP]], label %[[EXIT:.*]]
|
|
; CHECK: [[EXIT]]:
|
|
; CHECK-NEXT: [[NOT3:%.*]] = xor i1 [[OR]], true
|
|
; CHECK-NEXT: [[EXT3:%.*]] = zext i1 [[NOT3]] to i8
|
|
; CHECK-NEXT: ret i8 [[EXT3]]
|
|
;
|
|
entry:
|
|
%flag = alloca i8, align 1
|
|
%cmp = icmp slt i8 %x, -1
|
|
br label %loop
|
|
|
|
loop:
|
|
%phi = phi i1 [ %cmp, %entry ], [ %c, %loop ]
|
|
%not1 = xor i1 %phi, true
|
|
%or = or i1 %cmp, %not1
|
|
%not2 = xor i1 %or, true
|
|
%ext2 = zext i1 %not2 to i8
|
|
store i8 %ext2, ptr %p, align 1
|
|
store i8 1, ptr %flag, align 1
|
|
%flagv = load i8, ptr %flag, align 1
|
|
%cond = icmp eq i8 %flagv, 0
|
|
br i1 %cond, label %loop, label %exit
|
|
|
|
exit:
|
|
%not3 = xor i1 %or, true
|
|
%ext3 = zext i1 %not3 to i8
|
|
ret i8 %ext3
|
|
}
|