[PATCH] D111006: [PHIElimination] Enable machine verification after this pass
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 07:11:04 PDT 2021
uabelho added a comment.
Hi,
I ran into a verifier error after PHIElimination with this patch.
I saw this for my out-of-tree target, but I think the following mir-testcase exposes the same thing on X86:
llc -verify-machineinstrs -o /dev/null bbi-61405_x86.mir -run-pass=livevars,phi-node-elimination,twoaddressinstruction
Result:
*** Bad machine code: LiveVariables: Block should not be in AliveBlocks ***
- function: f245
- basic block: %bb.1 (0x7353b68)
Virtual register %6 is not needed live through the block.
LLVM ERROR: Found 1 machine code errors.
It seems to be the undef use of %6 in
dead %2:gr16 = PHI undef %6, %bb.1, undef %3, %bb.5
that trips PHI Elimination over.
Without it, the inserted COPY for the other PHI gets a kill marking on its source (%6), and all is fine.
But with the "undef %6" operand in the second PHI, the kill marking is skipped and then we get the verifier error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111006/new/
https://reviews.llvm.org/D111006
More information about the llvm-commits
mailing list