[llvm] llvm-reduce: Don't print verifier failed machine functions (PR #109673)

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 00:26:05 PDT 2024


mikaelholmen wrote:

I noticed that if I run llc now, some input that previously failed in the
```
MBB->getParent()->verify();
```
calls in ```LiveRangeCalc::findReachingDefs``` and then caused nice verifier printouts now just result in
```LLVM ERROR: Found 1 machine code errors.```
Before I got the full output like
```
[whole function]
*** Bad machine code: Reading virtual register without a def ***
- function:    main
- basic block: %bb.0  (0x5614450f2d88)
- instruction: CMP32ri8 %0:gr32, 42, implicit-def $eflags
- operand 0:   %0:gr32
LLVM ERROR: Found 1 machine code errors.
```
Is this expected? The commit message only talks about reducing output for llvm-reduce?
Can be reproduced with
```llc -O0 -mtriple i686-- -o /dev/null foo.ll -run-pass=register-coalescer```
on
```
---
name:            main
tracksRegLiveness: true
body:             |
  bb.0:
    successors:

    %0:gr32 = IMPLICIT_DEF
    %1:gr32 = COPY %0
    %1:gr32 = ADD32ri8 %1, 1, implicit-def dead $eflags
    CMP32ri8 %0, 42, implicit-def $eflags

...
```

https://github.com/llvm/llvm-project/pull/109673


More information about the llvm-commits mailing list