Skip to content

Commit

Permalink
Add verification to the HLSL test
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiorano committed Sep 24, 2024
1 parent 24aecf5 commit 4a80f6b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/clang/test/CodeGenHLSL/SplatGroupSharedScalar.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
// RUN: %dxc -E main -T cs_6_0 %s
// RUN: %dxc -E main -T cs_6_0 -fcgl %s | FileCheck %s

// Validate that when swizzling requires an r-value (i.e. duplicate elements), that the result is stored to
// and loaded from a temporary.
// CHECK: store <1 x i32> %splat.splat, <1 x i32>* %tmp
// CHECK-NEXT: %1 = load <1 x i32>, <1 x i32>* %tmp
// CHECK-NEXT: %2 = shufflevector <1 x i32> %1, <1 x i32> undef, <4 x i32> zeroinitializer
// CHECK-NEXT: store <4 x i32> %2, <4 x i32>* %x

groupshared int a;
[numthreads(64, 1, 1)]
Expand Down

0 comments on commit 4a80f6b

Please sign in to comment.