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
70 lines
2.6 KiB
LLVM
70 lines
2.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S -passes=newgvn < %s | FileCheck %s
|
|
|
|
; Make sure attributes in function calls are intersected correctly.
|
|
|
|
define i1 @bucket(i32 noundef %x) {
|
|
; CHECK-LABEL: define i1 @bucket(
|
|
; CHECK-SAME: i32 noundef [[X:%.*]]) {
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[X]], 0
|
|
; CHECK-NEXT: [[CTPOP1:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 [[X]])
|
|
; CHECK-NEXT: [[CMP2:%.*]] = icmp samesign ult i32 [[CTPOP1]], 2
|
|
; CHECK-NEXT: [[COND:%.*]] = select i1 [[CMP1]], i1 [[CMP2]], i1 false
|
|
; CHECK-NEXT: br i1 [[COND]], label %[[IF_THEN:.*]], label %[[IF_ELSE:.*]]
|
|
; CHECK: [[IF_ELSE]]:
|
|
; CHECK-NEXT: [[RES:%.*]] = icmp eq i32 [[CTPOP1]], 1
|
|
; CHECK-NEXT: ret i1 [[RES]]
|
|
; CHECK: [[IF_THEN]]:
|
|
; CHECK-NEXT: ret i1 false
|
|
;
|
|
%cmp1 = icmp sgt i32 %x, 0
|
|
%ctpop1 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 %x)
|
|
%cmp2 = icmp samesign ult i32 %ctpop1, 2
|
|
%cond = select i1 %cmp1, i1 %cmp2, i1 false
|
|
br i1 %cond, label %if.then, label %if.else
|
|
|
|
if.else:
|
|
%ctpop2 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %x)
|
|
%res = icmp eq i32 %ctpop2, 1
|
|
ret i1 %res
|
|
|
|
if.then:
|
|
ret i1 false
|
|
}
|
|
|
|
; Make sure we don't merge these two users of the incompatible call pair.
|
|
|
|
define i1 @bucket2(i32 noundef %x) {
|
|
; CHECK-LABEL: define i1 @bucket2(
|
|
; CHECK-SAME: i32 noundef [[X:%.*]]) {
|
|
; CHECK-NEXT: [[CMP1:%.*]] = icmp sgt i32 [[X]], 0
|
|
; CHECK-NEXT: [[CTPOP1:%.*]] = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 zeroext [[X]])
|
|
; CHECK-NEXT: [[CTPOP1INC:%.*]] = add i32 [[CTPOP1]], 1
|
|
; CHECK-NEXT: [[CMP2:%.*]] = icmp samesign ult i32 [[CTPOP1INC]], 3
|
|
; CHECK-NEXT: [[COND:%.*]] = select i1 [[CMP1]], i1 [[CMP2]], i1 false
|
|
; CHECK-NEXT: br i1 [[COND]], label %[[IF_THEN:.*]], label %[[IF_ELSE:.*]]
|
|
; CHECK: [[IF_ELSE]]:
|
|
; CHECK-NEXT: [[CTPOP2:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 [[X]])
|
|
; CHECK-NEXT: [[CTPOP2INC:%.*]] = add i32 [[CTPOP2]], 1
|
|
; CHECK-NEXT: [[RES:%.*]] = icmp eq i32 [[CTPOP2INC]], 2
|
|
; CHECK-NEXT: ret i1 [[RES]]
|
|
; CHECK: [[IF_THEN]]:
|
|
; CHECK-NEXT: ret i1 false
|
|
;
|
|
%cmp1 = icmp sgt i32 %x, 0
|
|
%ctpop1 = tail call range(i32 1, 32) i32 @llvm.ctpop.i32(i32 zeroext %x)
|
|
%ctpop1inc = add i32 %ctpop1, 1
|
|
%cmp2 = icmp samesign ult i32 %ctpop1inc, 3
|
|
%cond = select i1 %cmp1, i1 %cmp2, i1 false
|
|
br i1 %cond, label %if.then, label %if.else
|
|
|
|
if.else:
|
|
%ctpop2 = tail call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %x)
|
|
%ctpop2inc = add i32 %ctpop2, 1
|
|
%res = icmp eq i32 %ctpop2inc, 2
|
|
ret i1 %res
|
|
|
|
if.then:
|
|
ret i1 false
|
|
}
|