[all-commits] [llvm/llvm-project] 093f18: [ARM] Prevent phi-node-elimination from generating...
David Green via All-commits
all-commits at lists.llvm.org
Fri Apr 16 08:45:40 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 093f1828e58c685d74afba8ad963809a3236f83d
https://github.com/llvm/llvm-project/commit/093f1828e58c685d74afba8ad963809a3236f83d
Author: Malhar Jajoo <malhar.jajoo at arm.com>
Date: 2021-04-16 (Fri, 16 Apr 2021)
Changed paths:
M llvm/lib/Target/ARM/ARMBaseInstrInfo.h
A llvm/test/CodeGen/Thumb2/phi_prevent_copy.mir
Log Message:
-----------
[ARM] Prevent phi-node-elimination from generating copy above t2WhileLoopStartLR
This patch prevents phi-node-elimination from generating a COPY
operation for the register defined by t2WhileLoopStartLR, as it is a
terminator that defines a value.
This happens because of the presence of phi-nodes in the loop body (the
Preheader of which is the block containing the t2WhileLoopStartLR). If
this is not done, the COPY is generated above/before the terminator
(t2WhileLoopStartLR here), and since it uses the value defined by
t2WhileLoopStartLR, MachineVerifier throws a 'use before define' error.
This essentially adds on to the change in differential D91887/D97729.
Differential Revision: https://reviews.llvm.org/D100376
More information about the All-commits
mailing list