farzonl wrote:

> > > hmm I was expecting there to be a clang test change aswell because 
> > > `__builtin_hlsl_wave_active_ballot` for DX targets has to have the codgen 
> > > for constructing the vector from the struct while the SPIRV target wont.
> > 
> > 
> > This is accomplished in 
> > clang/test/CodeGenHLSL/builtins/WaveActiveBallot.hlsl. there is an alloca 
> > for a vector of 4 i32s.
> 
> But still the intrinsic name changed between targets the clang codegen should 
> reflect that

The failing test case is because the spv intrinsic name changed and the old 
name now no longer exists 
```
# RUN: at line 1
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/build/bin/llc
 -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll
 -o - | 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/build/bin/FileCheck
 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll
# executed command: 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/build/bin/llc
 -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll
 -o -
# executed command: 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/build/bin/FileCheck
 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll
# .---command stderr------------
# | 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll:6:14:
 error: CHECK-DAG: expected string not found in input
# | ; CHECK-DAG: %[[#scope:]] = OpConstant %[[#uint]] 3
# |              ^
# | <stdin>:1:1: note: scanning from here
# |  OpCapability Kernel
# | ^
# | <stdin>:1:1: note: with "uint" equal to "4"
# |  OpCapability Kernel
# | ^
# | <stdin>:14:2: note: possible intended match here
# |  %4 = OpTypeInt 32 0
# |  ^
# | 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll:14:48:
 error: undefined variable: bitmask
# | ; CHECK: %{{.+}} = OpGroupNonUniformBallot %[[#bitmask]] %[[#scope]] 
%[[#param]]
# |                                                ^
# | 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll:14:62:
 error: undefined variable: scope
# | ; CHECK: %{{.+}} = OpGroupNonUniformBallot %[[#bitmask]] %[[#scope]] 
%[[#param]]
# |                                                              ^
# | <stdin>:21:29: note: with "param" equal to "9"
# |  %9 = OpFunctionParameter %3
# |                             ^
# | <stdin>:23:2: note: possible intended match here
# |  %11 = OpFunctionCall %5 %7 %9
# |  ^
# | 
# | Input file: <stdin>
# | Check file: 
/Users/cbieneman/actions-runner/_work/llvm-project/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBallot.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  OpCapability Kernel 
# | dag:6'0        X~~~~~~~~~~~~~~~~~~~~ error: no match found
# | dag:6'1                              with "uint" equal to "4"
# |             2:  OpCapability Addresses 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~
# |             3:  OpCapability Linkage 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~
# |             4:  %1 = OpExtInstImport "OpenCL.std" 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5:  OpMemoryModel Physical64 OpenCL 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6:  OpSource OpenCL_CPP 100000 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |             9:  OpName %7 "llvm.spv.wave.ballot" 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            10:  OpName %2 "entry" 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~
# |            11:  OpDecorate %10 LinkageAttributes "test_wave_ballot" Export 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            12:  OpDecorate %7 LinkageAttributes "llvm.spv.wave.ballot" 
Import 
# | dag:6'0        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            13:  %3 = OpTypeBool 
# | dag:6'0        ~~~~~~~~~~~~~~~~~
# |            14:  %4 = OpTypeInt 32 0 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~
# | dag:6'2         ?                    possible intended match
# |            15:  %5 = OpTypeVector %4 4 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~
# |            16:  %6 = OpTypeFunction %5 %3 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            17:  %7 = OpFunction %5 None %6 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            18:  %8 = OpFunctionParameter %3 
# | dag:6'0        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            19:  OpFunctionEnd 
# | dag:6'0        ~~~~~~~~~~~~~~~
# |            20:  %10 = OpFunction %5 None %6 ; -- Begin function 
test_wave_ballot 
# | dag:6'0        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            21:  %9 = OpFunctionParameter %3 
# | check:14'0                                 X error: match failed for 
invalid pattern
# | check:14'1                                   undefined variable: bitmask
# | check:14'2                                   undefined variable: scope
# | check:14'3                                   with "param" equal to "9"
# |            22:  %2 = OpLabel 
# | check:14'0     ~~~~~~~~~~~~~~
# |            23:  %11 = OpFunctionCall %5 %7 %9 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:14'4      ?                              possible intended match
# |            24:  OpReturnValue %11 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~
# |            25:  OpFunctionEnd 
# | check:14'0     ~~~~~~~~~~~~~~~
# |            26:  ; -- End function 
# | check:14'0     ~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************
```

https://github.com/llvm/llvm-project/pull/175105
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to