diff options
author | yonghong-song <yhs@fb.com> | 2023-12-07 11:29:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 11:29:40 -0800 |
commit | 32d535195ec5d9b0caf03fee13f796fc8c66a79f (patch) | |
tree | 84486169b8f2bd2556039d9339e503eff61d9c0b /clang/test/ParserOpenACC/parse-wait-construct.c | |
parent | 0928312ec882005fa396dedba9a53f0817e4a2fb (diff) | |
download | llvm-32d535195ec5d9b0caf03fee13f796fc8c66a79f.zip llvm-32d535195ec5d9b0caf03fee13f796fc8c66a79f.tar.gz llvm-32d535195ec5d9b0caf03fee13f796fc8c66a79f.tar.bz2 |
BPF: Emit an error for illegal LD_imm64 insn when LLVM_ENABLE_ASSERTI… (#74035)
…ONS=OFF
Jose reported an issue ([1]) where for the below illegal asm code
```
r0 = 1 + w3 ll
```
clang actually supports it and generates the object code.
Further investigation finds that clang actually intends to reject the
above code as well but only when the clang is built with
LLVM_ENABLE_ASSERTIONS=ON.
I later found that clang16 (built by redhat and centos) in fedora system
has the same issue since they also have LLVM_ENABLE_ASSERTIONS=OFF
([2]).
So let BPF backend report an error for the above case regardless of the
LLVM_ENABLE_ASSERTIONS setting.
[1] https://lore.kernel.org/bpf/87leahx2xh.fsf@oracle.com/#t
[2]
https://lore.kernel.org/bpf/840e33ec-ea4c-4b55-bda1-0be8d1e0324f@linux.dev/
Co-authored-by: Yonghong Song <yonghong.song@linux.dev>
Diffstat (limited to 'clang/test/ParserOpenACC/parse-wait-construct.c')
0 files changed, 0 insertions, 0 deletions