[all-commits] [llvm/llvm-project] f7a53d: PR47468: Fix findPHICopyInsertPoint, so that copie...
James Y Knight via All-commits
all-commits at lists.llvm.org
Fri Sep 18 11:14:53 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f7a53d82c0902147909f28a9295a9d00b4b27d38
https://github.com/llvm/llvm-project/commit/f7a53d82c0902147909f28a9295a9d00b4b27d38
Author: James Y Knight <jyknight at google.com>
Date: 2020-09-18 (Fri, 18 Sep 2020)
Changed paths:
M llvm/lib/CodeGen/PHIEliminationUtils.cpp
A llvm/test/CodeGen/X86/callbr-asm-phi-placement.ll
Log Message:
-----------
PR47468: Fix findPHICopyInsertPoint, so that copies aren't incorrectly inserted after an INLINEASM_BR.
findPHICopyInsertPoint special cases placement in a block with a
callbr or invoke in it. In that case, we must ensure that the copy is
placed before the INLINEASM_BR or call instruction, if the register is
defined prior to that instruction, because it may jump out of the
block.
Previously, the code placed it immediately after the last def _or
use_. This is wrong, if the use is the instruction which may jump. We
could correctly place it immediately after the last def (ignoring
uses), but that is non-optimal for register pressure.
Instead, place the copy after the last def, or before the
call/inlineasm_br, whichever is later.
Differential Revision: https://reviews.llvm.org/D87865
More information about the All-commits
mailing list