[PATCH] D69123: NFC: Fix variable only used in asserts by propagating the value.

Sterling Augustine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 11:11:39 PDT 2019


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG05c3d90248db: NFC: Fix variable only used in asserts by propagating the value. (authored by saugustine).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69123

Files:
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -536,7 +536,6 @@
 void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   MCInst TmpInst;
   const bool IsDarwin = TM.getTargetTriple().isOSDarwin();
-  const bool IsPPC64 = Subtarget->isPPC64();
   const bool IsAIX = Subtarget->isAIXABI();
   const Module *M = MF->getFunction().getParent();
   PICLevel::Level PL = M->getPICLevel();
@@ -760,7 +759,8 @@
     return;
   }
   case PPC::ADDIStocHA: {
-    assert((IsAIX && !IsPPC64 && TM.getCodeModel() == CodeModel::Large) &&
+    assert((IsAIX && !Subtarget->isPPC64() &&
+            TM.getCodeModel() == CodeModel::Large) &&
            "This pseudo should only be selected for 32-bit large code model on"
            " AIX.");
 
@@ -790,7 +790,8 @@
     return;
   }
   case PPC::LWZtocL: {
-    assert(IsAIX && !IsPPC64 && TM.getCodeModel() == CodeModel::Large &&
+    assert(IsAIX && !Subtarget->isPPC64() &&
+           TM.getCodeModel() == CodeModel::Large &&
            "This pseudo should only be selected for 32-bit large code model on"
            " AIX.");
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69123.225473.patch
Type: text/x-patch
Size: 1244 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191017/9572a413/attachment.bin>


More information about the llvm-commits mailing list