[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 00:36:42 PDT 2023


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

Rebase onto 8e16365c <https://reviews.llvm.org/rG8e16365cb6162a29a2a8d26f2d5f0081a651d73a> to make the bot green again


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 =
+        SrcReg &&
         getContext().getRegisterInfo()->isSuperOrSubRegisterEq(DstReg, SrcReg);
 
     if (canUseATReg() && UseSrcReg && RdRegIsRsReg) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151288.525040.patch
Type: text/x-patch
Size: 512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230524/8f1865c3/attachment-0001.bin>


More information about the llvm-commits mailing list