Issue |
132013
|
Summary |
`clang-18.1.8` crash in "Early Machine Loop Invariant Code Motion"
|
Labels |
new issue
|
Assignees |
|
Reporter |
gonnet
|
Hi all,
I get the following compiler crash:
```
Stack dump:
0. Program arguments: /usr/lib/llvm-18/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 -D_FORTIFY_SOURCE=1 -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/k8-opt/bin/_objs/avx512fp16_prod_microkernels/f16-vsin-avx512fp16-rational-3-2-div.d -frandom-seed=bazel-out/k8-opt/bin/_objs/avx512fp16_prod_microkernels/f16-vsin-avx512fp16-rational-3-2-div.o -DPTHREADPOOL_NO_DEPRECATED_API -DXNN_LOG_LEVEL=0 -DXNN_ENABLE_CPUINFO=1 -DXNN_ENABLE_MEMOPT=1 -DXNN_ENABLE_SPARSE=1 -DXNN_ENABLE_ASSEMBLY=1 -DXNN_ENABLE_ARM_FP16_SCALAR=0 -DXNN_ENABLE_ARM_FP16_VECTOR=0 -DXNN_ENABLE_ARM_BF16=0 -DXNN_ENABLE_ARM_DOTPROD=0 -DXNN_ENABLE_ARM_I8MM=0 -DXNN_ENABLE_RISCV_FP16_VECTOR=0 -DXNN_ENABLE_AVX512AMX=1 -DXNN_ENABLE_AVX512FP16=1 -DXNN_ENABLE_AVX512BF16=1 -DXNN_ENABLE_AVXVNNI=1 -DXNN_ENABLE_AVXVNNIINT8=1 -DXNN_ENABLE_AVX512F=1 -DXNN_ENABLE_AVX256SKX=1 -DXNN_ENABLE_AVX256VNNI=1 -DXNN_ENABLE_AVX256VNNIGFNI=1 -DXNN_ENABLE_AVX512SKX=1 -DXNN_ENABLE_AVX512VBMI=1 -DXNN_ENABLE_AVX512VNNI=1 -DXNN_ENABLE_AVX512VNNIGFNI=1 -DXNN_ENABLE_HVX=0 -DXNN_ENABLE_KLEIDIAI=0 -DXNN_ENABLE_SRM_SME=0 -DXNN_ENABLE_ARM_SME2=0 -DXNN_ENABLE_WASM_REVECTORIZE=0 -iquote . -iquote bazel-out/k8-opt/bin -iquote external/+_repo_rules+pthreadpool -iquote bazel-out/k8-opt/bin/external/+_repo_rules+pthreadpool -iquote external/+_repo_rules+FXdiv -iquote bazel-out/k8-opt/bin/external/+_repo_rules+FXdiv -iquote external/+_repo_rules+cpuinfo -iquote bazel-out/k8-opt/bin/external/+_repo_rules+cpuinfo -Ibazel-out/k8-opt/bin/external/+_repo_rules+pthreadpool/_virtual_includes/pthreadpool -Ibazel-out/k8-opt/bin/external/+_repo_rules+FXdiv/_virtual_includes/FXdiv -Ibazel-out/k8-opt/bin/external/+_repo_rules+cpuinfo/_virtual_includes/cpuinfo -isystem include -isystem bazel-out/k8-opt/bin/include -isystem src -isystem bazel-out/k8-opt/bin/src -isystem external/+_repo_rules+pthreadpool/include -isystem bazel-out/k8-opt/bin/external/+_repo_rules+pthreadpool/include -isystem external/+_repo_rules+FXdiv/include -isystem bazel-out/k8-opt/bin/external/+_repo_rules+FXdiv/include -isystem external/+_repo_rules+cpuinfo/include -isystem bazel-out/k8-opt/bin/external/+_repo_rules+cpuinfo/include -isystem external/+_repo_rules+cpuinfo/src -isystem bazel-out/k8-opt/bin/external/+_repo_rules+cpuinfo/src -Wno-unused-but-set-variable -mstack-alignment=64 -fomit-frame-pointer -mstackrealign -mf16c -mfma -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl -mavx512vnni -mgfni -mavx512fp16 -std=c99 -O2 -c src/f16-vsin/gen/f16-vsin-avx512fp16-rational-3-2-div.c -o bazel-out/k8-opt/bin/_objs/avx512fp16_prod_microkernels/f16-vsin-avx512fp16-rational-3-2-div.o -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\"
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'src/f16-vsin/gen/f16-vsin-avx512fp16-rational-3-2-div.c'.
4. Running pass 'Early Machine Loop Invariant Code Motion' on function '@xnn_f16_vsin_ukernel__avx512fp16_rational_3_2_div_u32'
```
```
$ /usr/lib/llvm-18/bin/clang --version
Debian clang version 18.1.8 (16)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-18/bin
```
I've attached the pre-processed source file generated with the same arguments as the command above.
[f16-vsin-avx512fp16-rational-3-2-div.c.gz](https://github.com/user-attachments/files/19340278/f16-vsin-avx512fp16-rational-3-2-div.c.gz)
I tried reproducing with version `19.1.7`, but that doesn't fail.
Pending a fix, is there anything I can do to work around this issue?
Cheers, Pedro
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs