diff options
author | Martin Storsjö <martin@martin.st> | 2020-09-23 08:51:34 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-09-23 09:03:01 +0300 |
commit | 2c4c659666b400b0502e8504a708e050d0a03d6c (patch) | |
tree | 5ffd66eb0c858d80ec292ed230a4a74dc994ef17 | |
parent | f69e090d7dca6bf2786145a9e97b0a7ddb3b514a (diff) | |
download | llvm-2c4c659666b400b0502e8504a708e050d0a03d6c.zip llvm-2c4c659666b400b0502e8504a708e050d0a03d6c.tar.gz llvm-2c4c659666b400b0502e8504a708e050d0a03d6c.tar.bz2 |
[InstCombine] Add parentheses in assert to silence GCC warning. NFC.
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp index c1cacdf..15bdbd0 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -1205,8 +1205,9 @@ Instruction *InstCombinerImpl:: static Instruction *factorizeMathWithShlOps(BinaryOperator &I, InstCombiner::BuilderTy &Builder) { // TODO: Also handle mul by doubling the shift amount? - assert(I.getOpcode() == Instruction::Add || - I.getOpcode() == Instruction::Sub && "Expected add/sub"); + assert((I.getOpcode() == Instruction::Add || + I.getOpcode() == Instruction::Sub) && + "Expected add/sub"); auto *Op0 = dyn_cast<BinaryOperator>(I.getOperand(0)); auto *Op1 = dyn_cast<BinaryOperator>(I.getOperand(1)); if (!Op0 || !Op1 || !(Op0->hasOneUse() || Op1->hasOneUse())) |