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
48 lines
2.0 KiB
LLVM
48 lines
2.0 KiB
LLVM
; RUN: llvm-as %s -o %t.bc
|
|
; RUN: llvm-spirv -s %t.bc -o %t.regularized.bc
|
|
; RUN: llvm-dis %t.regularized.bc -o %t.regularized.ll
|
|
; RUN: FileCheck < %t.regularized.ll %s
|
|
|
|
; Translation cycle should be successful:
|
|
; RUN: llvm-spirv %t.regularized.bc -o %t.spv
|
|
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
|
|
; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv64-unknown-unknown -filetype=obj %s -o %t.llc.spv %}
|
|
; RUN: %if spirv-backend %{ llvm-spirv -r %t.llc.spv -o %t.llc.rev.bc %}
|
|
|
|
; CHECK: %[[#Base:]] = load i1, ptr addrspace(4){{.*}}, align 1
|
|
; CHECK: %[[#LoadShift:]] = load i32, ptr addrspace(4){{.*}} align 4
|
|
; CHECK: %[[#AndShift:]] = and i32 %[[#LoadShift]], 1
|
|
; CHECK: %[[#CmpShift:]] = icmp ne i32 %[[#AndShift]], 0
|
|
; CHECK: %[[#ExtBase:]] = select i1 %[[#Base]], i32 1, i32 0
|
|
; CHECK: %[[#ExtShift:]] = select i1 %[[#CmpShift]], i32 1, i32 0
|
|
; CHECK: %[[#LSHR:]] = lshr i32 %[[#ExtBase]], %[[#ExtShift]]
|
|
; CHECK: and i32 %[[#LSHR]], 1
|
|
|
|
; CHECK: %[[#ExtVecBase:]] = select <2 x i1> %vec1, <2 x i32> splat (i32 1), <2 x i32> zeroinitializer
|
|
; CHECK: %[[#ExtVecShift:]] = select <2 x i1> %vec2, <2 x i32> splat (i32 1), <2 x i32> zeroinitializer
|
|
; CHECK: lshr <2 x i32> %[[#ExtVecBase]], %[[#ExtVecShift]]
|
|
|
|
; ModuleID = 'source.bc'
|
|
source_filename = "source.cpp"
|
|
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
|
|
target triple = "spir64-unknown-unknown"
|
|
|
|
%"class.ac" = type { i1 }
|
|
|
|
; Function Attrs: convergent mustprogress norecurse nounwind
|
|
define linkonce_odr dso_local spir_func void @foo(<2 x i1> %vec1, <2 x i1> %vec2) align 2 {
|
|
%1 = alloca ptr addrspace(4), align 8
|
|
%2 = alloca i32, align 4
|
|
%3 = addrspacecast ptr %1 to ptr addrspace(4)
|
|
%4 = addrspacecast ptr %2 to ptr addrspace(4)
|
|
%5 = load ptr addrspace(4), ptr addrspace(4) %3, align 8
|
|
%6 = load i1, ptr addrspace(4) %5, align 1
|
|
%7 = load i32, ptr addrspace(4) %4, align 4
|
|
%8 = trunc i32 %7 to i1
|
|
%9 = lshr i1 %6, %8
|
|
%10 = zext i1 %9 to i32
|
|
%11 = and i32 %10, 1
|
|
%12 = lshr <2 x i1> %vec1, %vec2
|
|
ret void
|
|
}
|