OSDN Git Service

Fix precedence in assert from r364961
authorJessica Paquette <jpaquette@apple.com>
Wed, 3 Jul 2019 18:30:01 +0000 (18:30 +0000)
committerJessica Paquette <jpaquette@apple.com>
Wed, 3 Jul 2019 18:30:01 +0000 (18:30 +0000)
Precedence was wrong in an assert added in r364961. Add braces around the
assertion condition to make it right.

See: https://reviews.llvm.org/D64084

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64InstructionSelector.cpp

index eaae720..46d6ccb 100644 (file)
@@ -2935,7 +2935,8 @@ MachineInstr *AArch64InstructionSelector::emitIntegerCompare(
   Register ZReg;
 
   LLT CmpTy = MRI.getType(LHS.getReg());
-  assert(CmpTy.isScalar() || CmpTy.isPointer() && "Expected scalar or pointer");
+  assert((CmpTy.isScalar() || CmpTy.isPointer()) &&
+         "Expected scalar or pointer");
   if (CmpTy == LLT::scalar(32)) {
     CmpOpc = AArch64::SUBSWrr;
     ZReg = AArch64::WZR;