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
41 lines
2.1 KiB
LLVM
41 lines
2.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=instcombine -S < %s | FileCheck %s
|
|
|
|
; This test checks a regression in the select operand folding combine, in which
|
|
; Constant::getUniqueInteger would crash for a scalable-vector zeroinitializer.
|
|
define <vscale x 1 x i32> @select_opt(<vscale x 1 x i32> %b, <vscale x 1 x i1> %m) {
|
|
; CHECK-LABEL: @select_opt(
|
|
; CHECK-NEXT: [[C:%.*]] = add nsw <vscale x 1 x i32> [[B:%.*]], splat (i32 2)
|
|
; CHECK-NEXT: [[D:%.*]] = select <vscale x 1 x i1> [[M:%.*]], <vscale x 1 x i32> [[C]], <vscale x 1 x i32> [[B]]
|
|
; CHECK-NEXT: ret <vscale x 1 x i32> [[D]]
|
|
;
|
|
%c = add nsw <vscale x 1 x i32> %b, splat (i32 2)
|
|
%d = select <vscale x 1 x i1> %m, <vscale x 1 x i32> %c, <vscale x 1 x i32> %b
|
|
ret <vscale x 1 x i32> %d
|
|
}
|
|
|
|
define <vscale x 2 x i64> @load_scalable_of_selected_ptrs(ptr %p0, ptr %p1, i64 %idx) {
|
|
; CHECK-LABEL: @load_scalable_of_selected_ptrs(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[ARRAYIDX0:%.*]] = getelementptr inbounds [4 x i8], ptr [[P0:%.*]], i64 [[IDX:%.*]]
|
|
; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [4 x i8], ptr [[P1:%.*]], i64 [[IDX]]
|
|
; CHECK-NEXT: [[L0:%.*]] = load i32, ptr [[ARRAYIDX0]], align 4
|
|
; CHECK-NEXT: [[L1:%.*]] = load i32, ptr [[ARRAYIDX1]], align 4
|
|
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[L0]], [[L1]]
|
|
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[CMP]], ptr [[ARRAYIDX0]], ptr [[ARRAYIDX1]]
|
|
; CHECK-NEXT: [[RET:%.*]] = load <vscale x 2 x i64>, ptr [[SEL]], align 16
|
|
; CHECK-NEXT: ret <vscale x 2 x i64> [[RET]]
|
|
;
|
|
entry:
|
|
; Test introduced in response to a TypeSize warning arising from isSafeToLoadUnconditionally via instcombine.
|
|
; deref (p0[0] < p1[0] ? p0 : p1) as <vscale x 2 x i64>.
|
|
%arrayidx0 = getelementptr inbounds i32, ptr %p0, i64 %idx
|
|
%arrayidx1 = getelementptr inbounds i32, ptr %p1, i64 %idx
|
|
%l0 = load i32, ptr %arrayidx0
|
|
%l1 = load i32, ptr %arrayidx1
|
|
%cmp = icmp slt i32 %l0, %l1
|
|
%sel = select i1 %cmp, ptr %arrayidx0, ptr %arrayidx1
|
|
%ret = load <vscale x 2 x i64>, ptr %sel
|
|
ret <vscale x 2 x i64> %ret
|
|
}
|