[PATCH] D80077: [LiveVariables] Don't set undef reg PHI used as live for FromMBB
Zhang Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 00:30:56 PDT 2020
ZhangKang added a comment.
In D80077#2045630 <https://reviews.llvm.org/D80077#2045630>, @lkail wrote:
> It looks like a bug in phi-node-elimination to me. When critical edge `bb.0 -> bb.2` is splitted and `bb.3` is inserted, `undef %undef` is transformed into `%3 = IMPLICIT_DEF` in `bb.3`. LV in `bb.2` is not updated in memory(If we run `phi-node-elimination` and `twoaddressinstruction` separately, we won't run into crash).
It's not a bug, I have checked the LiveVariables has been updated before exit the `machineverifier` pass.
If you use below command you can also get the error.
llc -verify-machineinstrs -mtriple=aarch64-linux-gnu -verify-machineinstrs PHIElimination-crash.mir -run-pass=livevars,phi-node-elimination,phi-node-elimination -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1 -o runpass-phi-node-elimination.mir
If the last pass is `machineverifier` pass, the LiveVariables will not be preserved, so the last `machineverifier` pass won't get the LiveVariables and it doesn't check LiveVariables.
Above command run `phi-node-elimination ` pass twice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80077/new/
https://reviews.llvm.org/D80077
More information about the llvm-commits
mailing list