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
124 lines
3.7 KiB
LLVM
124 lines
3.7 KiB
LLVM
; The goal of the test is to check that newly inserted `ptrcast` internal
|
|
; intrinsic functions for PHI's operands are inserted at the correct
|
|
; positions, and don't break rules of instruction domination and PHI nodes
|
|
; grouping at top of basic block.
|
|
|
|
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
|
|
; CHECK-DAG: OpName %[[#Case1:]] "case1"
|
|
; CHECK-DAG: OpName %[[#Case2:]] "case2"
|
|
; CHECK-DAG: OpName %[[#Case3:]] "case3"
|
|
|
|
%struct1 = type { i64 }
|
|
%struct2 = type { i64, i64 }
|
|
|
|
@.str.1 = private unnamed_addr addrspace(1) constant [3 x i8] c"OK\00", align 1
|
|
@.str.2 = private unnamed_addr addrspace(1) constant [6 x i8] c"WRONG\00", align 1
|
|
|
|
; CHECK: %[[#Case1]] = OpFunction
|
|
define spir_func void @case1(i1 %b1, i1 %b2, i1 %b3) {
|
|
entry:
|
|
%tmp.1 = alloca i8, align 1
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1:]] %[[#l2:]]
|
|
br i1 %b1, label %l1, label %l2
|
|
|
|
l1:
|
|
%str = phi ptr addrspace(1) [ @.str.1, %entry ], [ @.str.2, %l2 ], [ @.str.2, %l3 ]
|
|
%v1 = load i8, ptr addrspace(1) %str, align 1
|
|
store i8 %v1, ptr %tmp.1, align 1
|
|
br label %exit
|
|
|
|
; CHECK: %[[#l2]] = OpLabel
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#l3:]]
|
|
l2:
|
|
br i1 %b2, label %l1, label %l3
|
|
|
|
; CHECK: %[[#l3]] = OpLabel
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#exit:]]
|
|
l3:
|
|
br i1 %b3, label %l1, label %exit
|
|
|
|
; CHECK: %[[#l1]] = OpLabel
|
|
; CHECK-NEXT: OpPhi
|
|
; CHECK: OpBranch %[[#exit]]
|
|
|
|
; CHECK: %[[#exit]] = OpLabel
|
|
; CHECK: OpReturn
|
|
exit:
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK: %[[#Case2]] = OpFunction
|
|
define spir_func void @case2(i1 %b1, i1 %b2, i1 %b3, ptr addrspace(1) byval(%struct1) %str1, ptr addrspace(1) byval(%struct2) %str2) {
|
|
entry:
|
|
%tmp.2 = alloca i8, align 1
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1:]] %[[#l2:]]
|
|
br i1 %b1, label %l1, label %l2
|
|
|
|
l1:
|
|
%str = phi ptr addrspace(1) [ %str1, %entry ], [ %str2, %l2 ], [ %str2, %l3 ]
|
|
%v2 = load i8, ptr addrspace(1) %str, align 1
|
|
store i8 %v2, ptr %tmp.2, align 1
|
|
br label %exit
|
|
|
|
; CHECK: %[[#l2]] = OpLabel
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#l3:]]
|
|
l2:
|
|
br i1 %b2, label %l1, label %l3
|
|
|
|
; CHECK: %[[#l3]] = OpLabel
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#exit:]]
|
|
l3:
|
|
br i1 %b3, label %l1, label %exit
|
|
|
|
; CHECK: %[[#l1]] = OpLabel
|
|
; CHECK-NEXT: OpPhi
|
|
; CHECK: OpBranch %[[#exit]]
|
|
|
|
; CHECK: %[[#exit]] = OpLabel
|
|
; CHECK: OpReturn
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
; CHECK: %[[#Case3]] = OpFunction
|
|
define spir_func void @case3(i1 %b1, i1 %b2, i1 %b3, ptr addrspace(1) byval(%struct1) %_arg_str1, ptr addrspace(1) byval(%struct2) %_arg_str2) {
|
|
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1:]] %[[#l2:]]
|
|
entry:
|
|
%tmp.3 = alloca i8, align 1
|
|
br i1 %b1, label %l1, label %l2
|
|
|
|
l1:
|
|
%str = phi ptr addrspace(1) [ %_arg_str1, %entry ], [ %str2, %l2 ], [ %str3, %l3 ]
|
|
%v3 = load i8, ptr addrspace(1) %str, align 1
|
|
store i8 %v3, ptr %tmp.3, align 1
|
|
br label %exit
|
|
|
|
; CHECK: %[[#l2]] = OpLabel
|
|
; CHECK: OpInBoundsPtrAccessChain
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#l3:]]
|
|
l2:
|
|
%str2 = getelementptr inbounds %struct2, ptr addrspace(1) %_arg_str2, i32 1
|
|
br i1 %b2, label %l1, label %l3
|
|
|
|
; CHECK: %[[#l3]] = OpLabel
|
|
; CHECK: OpInBoundsPtrAccessChain
|
|
; CHECK: OpBranchConditional %[[#]] %[[#l1]] %[[#exit:]]
|
|
l3:
|
|
%str3 = getelementptr inbounds %struct2, ptr addrspace(1) %_arg_str2, i32 2
|
|
br i1 %b3, label %l1, label %exit
|
|
|
|
; CHECK: %[[#l1]] = OpLabel
|
|
; CHECK-NEXT: OpPhi
|
|
; CHECK: OpBranch %[[#exit]]
|
|
|
|
; CHECK: %[[#exit]] = OpLabel
|
|
; CHECK: OpReturn
|
|
exit:
|
|
ret void
|
|
}
|