[llvm] 7a51aea - [X86] Silence -Wlogical-op-parentheses in X86CompressEVEX.cpp (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 01:27:20 PST 2024
Author: Jie Fu
Date: 2024-01-30T17:26:35+08:00
New Revision: 7a51aeadb933301a38bf2e81e25618bcf173fa8e
URL: https://github.com/llvm/llvm-project/commit/7a51aeadb933301a38bf2e81e25618bcf173fa8e
DIFF: https://github.com/llvm/llvm-project/commit/7a51aeadb933301a38bf2e81e25618bcf173fa8e.diff
LOG: [X86] Silence -Wlogical-op-parentheses in X86CompressEVEX.cpp (NFC)
llvm-project/llvm/lib/Target/X86/X86CompressEVEX.cpp:233:15:
error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
if (!IsND && !IsMovberr || !isRedundantNewDataDest(MI, ST))
~~~~~~^~~~~~~~~~~~~ ~~
llvm-project/llvm/lib/Target/X86/X86CompressEVEX.cpp:233:15:
note: place parentheses around the '&&' expression to silence this warning
if (!IsND && !IsMovberr || !isRedundantNewDataDest(MI, ST))
^
( )
1 error generated.
Added:
Modified:
llvm/lib/Target/X86/X86CompressEVEX.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86CompressEVEX.cpp b/llvm/lib/Target/X86/X86CompressEVEX.cpp
index 7191e05178610..9132f0d1c2c03 100644
--- a/llvm/lib/Target/X86/X86CompressEVEX.cpp
+++ b/llvm/lib/Target/X86/X86CompressEVEX.cpp
@@ -230,7 +230,7 @@ static bool CompressEVEXImpl(MachineInstr &MI, const X86Subtarget &ST) {
MI.getOpcode() == X86::MOVBE32rr || MI.getOpcode() == X86::MOVBE64rr;
bool IsND = X86II::hasNewDataDest(TSFlags);
if ((TSFlags & X86II::EVEX_B) || IsMovberr)
- if (!IsND && !IsMovberr || !isRedundantNewDataDest(MI, ST))
+ if ((!IsND && !IsMovberr) || !isRedundantNewDataDest(MI, ST))
return false;
ArrayRef<X86CompressEVEXTableEntry> Table = ArrayRef(X86CompressEVEXTable);
More information about the llvm-commits
mailing list