[clang] [HLSL] error on out of bounds vector accesses (PR #128952)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 12 04:31:16 PDT 2025
zmodem wrote:
This broke our builds. Here's a small repro:
```
$ cat /tmp/a.cc
#include <immintrin.h>
__m256i parens;
int f() {
return ((__v32qi)parens)[31];
}
$ build/bin/clang -c /tmp/a.cc
/tmp/a.cc:4:20: error: vector element index 31 is out of bounds
4 | return ((__v32qi)parens)[31];
| ^
1 error generated.
```
`__v32qi` is a 32-element vector of char.
I'll revert to green for now.
https://github.com/llvm/llvm-project/pull/128952
More information about the cfe-commits
mailing list