Skip to content

Commit 23d4fe6

Browse files
committed
[RISCV] Fix gcc -Wparentheses warning [NFC]
Without this gcc warned like ../lib/Target/RISCV/RISCVVLOptimizer.cpp:760: warning: suggest parentheses around '&&' within '||' [-Wparentheses] 760 | VLOp.getReg() != RISCV::X0 && "Did not expect X0 VL"); |
1 parent 3142dff commit 23d4fe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,8 @@ bool RISCVVLOptimizer::checkUsers(const MachineOperand *&CommonVL,
756756
const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
757757

758758
// Looking for an immediate or a register VL that isn't X0.
759-
assert(!VLOp.isReg() ||
760-
VLOp.getReg() != RISCV::X0 && "Did not expect X0 VL");
759+
assert((!VLOp.isReg() || VLOp.getReg() != RISCV::X0) &&
760+
"Did not expect X0 VL");
761761

762762
if (!CommonVL) {
763763
CommonVL = &VLOp;

0 commit comments

Comments
 (0)