diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-03-13 21:49:16 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-13 21:49:16 +0700 |
commit | c3c97eab12746f206e695846d327ffba132afa49 (patch) | |
tree | 40ce6a31bdf2b8814eb406f76a2c4eced3a7d756 /llvm/lib/CodeGen/PeepholeOptimizer.cpp | |
parent | 6ff33edf4d59803b4329a50361f94b7fd17bbdf8 (diff) | |
download | llvm-c3c97eab12746f206e695846d327ffba132afa49.zip llvm-c3c97eab12746f206e695846d327ffba132afa49.tar.gz llvm-c3c97eab12746f206e695846d327ffba132afa49.tar.bz2 |
PeepholeOpt: Do not skip reg_sequence sources with subregs (#125667)
Contrary to the comment, this particular code is not responsible
for handling any composes that may be required, and unhandled cases
are already rejected later. Lift this restriction to permit composes
and reg_sequence subregisters later.
Diffstat (limited to 'llvm/lib/CodeGen/PeepholeOptimizer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PeepholeOptimizer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp index ec8e97f..6f44837 100644 --- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp +++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp @@ -406,9 +406,7 @@ public: const MachineOperand &MOInsertedReg = CopyLike.getOperand(CurrentSrcIdx); Src.Reg = MOInsertedReg.getReg(); - // If we have to compose sub-register indices, bail out. - if ((Src.SubReg = MOInsertedReg.getSubReg())) - return false; + Src.SubReg = MOInsertedReg.getSubReg(); // We want to track something that is compatible with the related // partial definition. |