Silence gcc warning by adding parentheses to condition [NFC]
authorMikael Holmen <mikael.holmen@ericsson.com>
Wed, 10 Jul 2019 06:18:03 +0000 (06:18 +0000)
committerMikael Holmen <mikael.holmen@ericsson.com>
Wed, 10 Jul 2019 06:18:03 +0000 (06:18 +0000)
Without this gcc 7.4.0 complains with

  ../include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:457:54: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
                    isArtifactCast(TmpDef->getOpcode()) &&
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                        "Expecting copy or artifact cast here");
                        ~

llvm-svn: 365597

llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h

index 2183ba0..a22778b 100644 (file)
@@ -453,9 +453,9 @@ private:
       MachineInstr *TmpDef = MRI.getVRegDef(PrevRegSrc);
       if (MRI.hasOneUse(PrevRegSrc)) {
         if (TmpDef != &DefMI) {
-          assert(TmpDef->getOpcode() == TargetOpcode::COPY ||
-                 isArtifactCast(TmpDef->getOpcode()) &&
-                     "Expecting copy or artifact cast here");
+          assert((TmpDef->getOpcode() == TargetOpcode::COPY ||
+                  isArtifactCast(TmpDef->getOpcode())) &&
+                 "Expecting copy or artifact cast here");
 
           DeadInsts.push_back(TmpDef);
         }