================
@@ -1,10 +1,22 @@
 ; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | 
FileCheck %s
 
-define noundef <4 x i32> @wave_ballot_simple(i1 noundef %p1) {
+%dx.types.fouri32 = type { i32, i32, i32, i32 }
+
+define <4 x i32> @wave_ballot_simple(i1 noundef %p1) {
 entry:
-; CHECK: call <4 x i32> @dx.op.waveBallot.void(i32 118, i1 %p1)
-  %ret = call <4 x i32> @llvm.dx.wave.ballot(i1 %p1)
-  ret <4 x i32> %ret
+; CHECK: call %dx.types.fouri32 @dx.op.waveActiveBallot(i32 116, i1 %p1)
+; CHECK-NOT: ret %dx.types.fouri32
+; CHECK: ret <4 x i32>
----------------
inbelic wrote:

Maybe this is just a confusion on my part but. I would not have expected us to 
return a vector in the final dxil output? IIUC that is the point of the custom 
struct type.

Ah wait, the insertelements will go away when we run the scalarizer.

Can we add a test that runs with the scalarizer to ensure we get the expected 
output in that case?

edit: Although I see in the `dxil-dis` we still have a vector around, why is 
that?

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