Zig Version
0.16.0-dev.3143+fa6509899
Steps to Reproduce and Observed Behavior
exportfnfwht_32(x:@Vector(32,u8))@Vector(8,u32){return@shuffle(u32,x,undefined,@Vector(8,i32){4,5,6,7,0,1,2,3},);}
The above code compiles. This is nonsense, as x is of type @Vector(32, u8) but @shuffle is clearly operating on u32 elements, and would expect a @Vector(8, u32).
It inserts an @intCast from @Vector(32, u8) to @Vector(32, u32) for the argument and then inputs the mask as it is, which compiles into a vpmovzxbd + vpermq, so it basically zeroes out a bunch of the elements.
Expected Behavior
This should fail to compile.
### Zig Version
0.16.0-dev.3143+fa6509899
### Steps to Reproduce and Observed Behavior
```zig
export fn fwht_32(x: @Vector(32, u8)) @Vector(8, u32) {
return @shuffle(
u32,
x,
undefined,
@Vector(8, i32){ 4, 5, 6, 7, 0, 1, 2, 3 },
);
}
```
The above code compiles. This is nonsense, as `x` is of type `@Vector(32, u8)` but `@shuffle` is clearly operating on `u32` elements, and would expect a `@Vector(8, u32)`.
It inserts an `@intCast` from `@Vector(32, u8)` to `@Vector(32, u32)` for the argument and then inputs the mask as it is, which compiles into a `vpmovzxbd` + `vpermq`, so it basically zeroes out a bunch of the elements.
### Expected Behavior
This should fail to compile.