For Qualcomm machines, in either Clang or DXC compilation runs, WaveActiveAllEqual will behave incorrectly when waves are size 64 or 128.
Consider this code:
InVec2 is composed of int2 vectors. The first vector has {x, y} components, where x is different than all other x components in subsequent vectors in InVec2, and y is the same as all other y components in subsequent vectors in InVec2.
So, the if condition should block the first lane, and the rest of the lanes should all be active and identical, and we expect Result6 to be {true, true} for those lanes.
However, for those lanes, the results are {false, true}, which probably means that when computing WaveActiveAllEqual, the first lane is treated as active.
# | Name: ExpectedOut6
# | Format: Bool
# | Stride: 8
# | Data: [ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
# | 1, 1 ]
# | OutputProps:
# | Height: 0
# | Width: 0
# | Depth: 0
# | ...
# | Got:
# | ---
# | Name: Out6
# | Format: Bool
# | Stride: 8
# | Data: [ 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
# | 0, 1 ]
# | OutputProps:
# | Height: 0
# | Width: 0
# | Depth: 0
# | ...
For Qualcomm machines, in either Clang or DXC compilation runs, WaveActiveAllEqual will behave incorrectly when waves are size 64 or 128.
Consider this code:
InVec2 is composed of int2 vectors. The first vector has {x, y} components, where x is different than all other x components in subsequent vectors in InVec2, and y is the same as all other y components in subsequent vectors in InVec2.
So, the if condition should block the first lane, and the rest of the lanes should all be active and identical, and we expect Result6 to be {true, true} for those lanes.
However, for those lanes, the results are {false, true}, which probably means that when computing WaveActiveAllEqual, the first lane is treated as active.