klee/0001-Module-InstructionOperandTypeCheckPass-Fix-Wbitwise-.patch

66 lines
2.4 KiB
Diff

From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= <lzaoral@redhat.com>
Date: Sat, 5 Mar 2022 13:48:35 +0100
Subject: Module/InstructionOperandTypeCheckPass: Fix
-Wbitwise-instead-of-logical warning
Git-repo: https://github.com/lzaoral/klee#llvm14
Git-commit: fc8c581aac41a1b8df23a5f47d70ac2296be7ffc
Patch-mainline: no
References: llvm 14
This warning was introduced in Clang 14.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
lib/Module/InstructionOperandTypeCheckPass.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/Module/InstructionOperandTypeCheckPass.cpp b/lib/Module/InstructionOperandTypeCheckPass.cpp
index 5f428471..e67f051c 100644
--- a/lib/Module/InstructionOperandTypeCheckPass.cpp
+++ b/lib/Module/InstructionOperandTypeCheckPass.cpp
@@ -94,7 +94,7 @@ bool checkInstruction(const Instruction *i) {
// scalarizer pass might not remove these. This could be selecting which
// vector operand to feed to another instruction. The Executor can handle
// this so case so this is not a problem
- return checkOperandTypeIsScalarInt(i, 0) &
+ return checkOperandTypeIsScalarInt(i, 0) &&
checkOperandsHaveSameType(i, 1, 2);
}
// Integer arithmetic, logical and shifting
@@ -111,12 +111,12 @@ bool checkInstruction(const Instruction *i) {
case Instruction::Shl:
case Instruction::LShr:
case Instruction::AShr: {
- return checkOperandTypeIsScalarInt(i, 0) &
+ return checkOperandTypeIsScalarInt(i, 0) &&
checkOperandTypeIsScalarInt(i, 1);
}
// Integer comparison
case Instruction::ICmp: {
- return checkOperandTypeIsScalarIntOrPointer(i, 0) &
+ return checkOperandTypeIsScalarIntOrPointer(i, 0) &&
checkOperandTypeIsScalarIntOrPointer(i, 1);
}
// Integer Conversion
@@ -136,7 +136,7 @@ bool checkInstruction(const Instruction *i) {
case Instruction::FMul:
case Instruction::FDiv:
case Instruction::FRem: {
- return checkOperandTypeIsScalarFloat(i, 0) &
+ return checkOperandTypeIsScalarFloat(i, 0) &&
checkOperandTypeIsScalarFloat(i, 1);
}
// Floating point conversion
@@ -152,7 +152,7 @@ bool checkInstruction(const Instruction *i) {
}
// Floating point comparison
case Instruction::FCmp: {
- return checkOperandTypeIsScalarFloat(i, 0) &
+ return checkOperandTypeIsScalarFloat(i, 0) &&
checkOperandTypeIsScalarFloat(i, 1);
}
default:
--
2.35.3