[PATCH] Add missing breaks to AArch64InstrInfo::is{G,F}PRCopy

Renato Golin renato.golin at linaro.org
Fri Aug 1 08:36:37 PDT 2014


Hi t.p.northover,

Silly omission in one case, future-proof in other two. Caught by Coverity.

Tim, just making sure the "silly omission" was actually not intended.

http://reviews.llvm.org/D4757

Files:
  lib/Target/AArch64/AArch64InstrInfo.cpp

Index: lib/Target/AArch64/AArch64InstrInfo.cpp
===================================================================
--- lib/Target/AArch64/AArch64InstrInfo.cpp
+++ lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -1058,12 +1058,14 @@
              MI->getOperand(3).getImm() == 0 && "invalid ORRrs operands");
       return true;
     }
+    break;
   case AArch64::ADDXri: // add Xd, Xn, #0 (LSL #0)
     if (MI->getOperand(2).getImm() == 0) {
       assert(MI->getDesc().getNumOperands() == 4 &&
              MI->getOperand(3).getImm() == 0 && "invalid ADDXri operands");
       return true;
     }
+    break;
   }
   return false;
 }
@@ -1086,6 +1088,7 @@
              "invalid ORRv16i8 operands");
       return true;
     }
+    break;
   }
   return false;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4757.12108.patch
Type: text/x-patch
Size: 762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140801/83f65cea/attachment.bin>


More information about the llvm-commits mailing list