[llvm] 443d352 - [GlobalISel] fix a compilation error with gcc 6.3.0
Yonghong Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 09:17:16 PDT 2020
Author: Yonghong Song
Date: 2020-08-28T09:16:52-07:00
New Revision: 443d352a1c4c90f3b4f1179f849609a30bd23e62
URL: https://github.com/llvm/llvm-project/commit/443d352a1c4c90f3b4f1179f849609a30bd23e62
DIFF: https://github.com/llvm/llvm-project/commit/443d352a1c4c90f3b4f1179f849609a30bd23e62.diff
LOG: [GlobalISel] fix a compilation error with gcc 6.3.0
With gcc 6.3.0, I hit the following compilation error:
../lib/CodeGen/GlobalISel/Combiner.cpp: In member function
‘bool llvm::Combiner::combineMachineInstrs(llvm::MachineFunction&,
llvm::GISelCSEInfo*)’:
../lib/CodeGen/GlobalISel/Combiner.cpp:156:54: error: suggest parentheses
around ‘&&’ within ‘||’ [-Werror=parentheses]
assert(!CSEInfo || !errorToBool(CSEInfo->verify()) &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
"CSEInfo is not consistent. Likely missing calls to "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"observer on mutations");
Fix the code as suggested by the compiler.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/Combiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
index 0e17a616cfde..f1071d96e5a3 100644
--- a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
@@ -153,8 +153,8 @@ bool Combiner::combineMachineInstrs(MachineFunction &MF,
MFChanged |= Changed;
} while (Changed);
- assert(!CSEInfo || !errorToBool(CSEInfo->verify()) &&
+ assert(!CSEInfo || (!errorToBool(CSEInfo->verify()) &&
"CSEInfo is not consistent. Likely missing calls to "
- "observer on mutations");
+ "observer on mutations"));
return MFChanged;
}
More information about the llvm-commits
mailing list