[llvm] [TwoAddressInstruction] Propagate undef flags for partial defs (PR #79286)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 05:17:59 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff d1b473c7956c080fe4d784bb89f720fbd28024a6 19bba42a9cc4e0f473d95795a40a9333d179950a -- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 0b8bef24d1..af042c972a 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1935,8 +1935,9 @@ eliminateRegSequence(MachineBasicBlock::iterator &MBBI) {
for (unsigned i = 1, e = MI.getNumOperands(); i < e; i += 2)
OrigRegs.push_back(MI.getOperand(i).getReg());
if (LIS->hasInterval(DstReg)) {
- DefVN = LIS->getInterval(DstReg).Query(
- LIS->getInstructionIndex(MI)).valueOut();
+ DefVN = LIS->getInterval(DstReg)
+ .Query(LIS->getInstructionIndex(MI))
+ .valueOut();
}
}
@@ -2005,7 +2006,8 @@ eliminateRegSequence(MachineBasicBlock::iterator &MBBI) {
unsigned SubReg = UseOp.getSubReg();
if (UseOp.isUndef() || !SubReg)
continue;
- auto *VN = LI.getVNInfoAt(LIS->getInstructionIndex(*UseOp.getParent()));
+ auto *VN =
+ LI.getVNInfoAt(LIS->getInstructionIndex(*UseOp.getParent()));
if (DefVN != VN)
continue;
LaneBitmask LaneMask = TRI->getSubRegIndexLaneMask(SubReg);
``````````
</details>
https://github.com/llvm/llvm-project/pull/79286
More information about the llvm-commits
mailing list