Issue |
126827
|
Summary |
Extend clang/utils/creduce-clang-crash.py to reduce middle-end and backend crashes using llvm-reduce
|
Labels |
|
Assignees |
|
Reporter |
aeubanks
|
[creduce-clang-crash.py](https://github.com/llvm/llvm-project/blob/main/clang/utils/creduce-clang-crash.py) takes a clang command that crashes, creates an interestingness test from it, and passes it off to creduce/cvise. Reducing at the source language level can be quite slow and doesn't produce a nice `opt`/`llc` command with reduced IR for middle-end and backend crashes.
Before deciding to run creduce/cvise, we should try running `opt -On`/`llc -On` on the output IR.
For middle-end crashes, if we see `clang -On -Xclang -disable-llvm-passes -S -emit-llvm -o /tmp/a.ll; opt -On /tmp/a.ll -disable-output` still reproduces the crash, we should reduce `/tmp/a.ll` with `llvm-reduce` using `opt -On /tmp/a.ll` as the interestingness test.
For backend crashes, if we see `clang -On -Xclang -S -emit-llvm -o /tmp/a.ll; llc -On /tmp/a.ll -o /dev/null` still reproduces the crash, we should reduce `/tmp/a.ll` with `llvm-reduce` using `llc -On /tmp/a.ll` as the interestingness test.
(we should also rename the script to `reduce-clang-crash.py`)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs