Issue 234931
Summary After Post-RA pseudo instruction expansion: "*** Bad machine code: Dead def has a live def of the same register on the same instruction ***"
Labels new issue
Assignees
Reporter mikaelholmen
    llvm commit: 8db461d960
Reproduce with:
```clang --target=x86_64-unknown-linux-gnu -O1 -fno-pic -c bbi-121973.c -o /dev/null -mllvm -verify-machineinstrs```
Result:
```
# After Post-RA pseudo instruction expansion pass
# Machine code for function f28: NoPHIs, TracksLiveness, NoVRegs, TiedOpsRewritten, TracksDebugUserValues

bb.0.entry:
  dead $edi = MOV32ri @f27, implicit-def $edi, implicit-def $rdi
  TCRETURNdi64 @f27, 0, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit $rsp, implicit $ssp, implicit $edi

# End machine code for function f28.

*** Bad machine code: Dead def has a live def of the same register on the same instruction ***
- function:    f28
- basic block: %bb.0 entry (0x55fbb3d6bcc0)
- instruction: dead $edi = MOV32ri @f27, implicit-def $edi, implicit-def $rdi
- operand 0:   dead $edi
fatal error: error in backend: Found 1 machine code errors.
```

This starts happening with the improved verifier in 005b0ce22d.
I originally reported it in
 https://github.com/llvm/llvm-project/pull/233110#issuecomment-6310231600

[bbi-121973.c](https://github.com/user-attachments/files/33872640/bbi-121973.c)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to