diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-06-01 21:01:52 +0200 |
---|---|---|
committer | Matt Arsenault <arsenm2@gmail.com> | 2024-06-06 17:15:20 +0200 |
commit | 5be0d00daa5737b6d2165d0c3ec29ce8af068053 (patch) | |
tree | 97c02e75722db6732d2a6fa2ec56dc6e1d7fcd19 | |
parent | ac5e278067033636d51bbee41a6ddb9869d0455b (diff) | |
download | llvm-5be0d00daa5737b6d2165d0c3ec29ce8af068053.zip llvm-5be0d00daa5737b6d2165d0c3ec29ce8af068053.tar.gz llvm-5be0d00daa5737b6d2165d0c3ec29ce8af068053.tar.bz2 |
RegisterCoalescer: Remove unnecessary maybe_unused
2214026e957397cc6385f778b28d570485a31856 didn't fix an unused variable
warning correctly.
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 3397bd0..a808a54 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -1339,14 +1339,13 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP, if (SrcIdx && DstIdx) return false; - [[maybe_unused]] const unsigned DefSubIdx = DefMI->getOperand(0).getSubReg(); + const unsigned DefSubIdx = DefMI->getOperand(0).getSubReg(); const TargetRegisterClass *DefRC = TII->getRegClass(MCID, 0, TRI, *MF); if (!DefMI->isImplicitDef()) { if (DstReg.isPhysical()) { Register NewDstReg = DstReg; - unsigned NewDstIdx = TRI->composeSubRegIndices(CP.getSrcIdx(), - DefMI->getOperand(0).getSubReg()); + unsigned NewDstIdx = TRI->composeSubRegIndices(CP.getSrcIdx(), DefSubIdx); if (NewDstIdx) NewDstReg = TRI->getSubReg(DstReg, NewDstIdx); |