[PATCH] D151288: [MIPS] Check if register is non-null before calling isSuperOrSubRegisterEq (NFCI)

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 01:35:04 PDT 2023


barannikov88 updated this revision to Diff 525061.
barannikov88 added a comment.

Check UseSrcReg instead of SrcReg and rebase onto 8e16365c <https://reviews.llvm.org/rG8e16365cb6162a29a2a8d26f2d5f0081a651d73a> to make the bots happy


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151288/new/

https://reviews.llvm.org/D151288

Files:
  llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp


Index: llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
===================================================================
--- llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -3087,6 +3087,7 @@
         MipsMCExpr::create(MipsMCExpr::MEK_HIGHER, SymExpr, getContext());
 
     bool RdRegIsRsReg =
+        UseSrcReg &&
         getContext().getRegisterInfo()->isSuperOrSubRegisterEq(DstReg, SrcReg);
 
     if (canUseATReg() && UseSrcReg && RdRegIsRsReg) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151288.525061.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230524/554dae8a/attachment.bin>


More information about the llvm-commits mailing list