aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-07-20 14:31:18 +0200
committerNikita Popov <npopov@redhat.com>2023-07-21 10:10:50 +0200
commit086ee99564afbb11449c08ea2e094f7f49fadde5 (patch)
tree4191815d5864cec64f7a7e8fcb3b44574564c4a1 /llvm/lib/IR/Constants.cpp
parent163268ada0679a3cbaa3488e6e485770548c37f0 (diff)
downloadllvm-086ee99564afbb11449c08ea2e094f7f49fadde5.zip
llvm-086ee99564afbb11449c08ea2e094f7f49fadde5.tar.gz
llvm-086ee99564afbb11449c08ea2e094f7f49fadde5.tar.bz2
Reapply [IR] Mark and constant expressions as undesirable
Reapply after fixing an issue in canonicalizeLogicFirst() exposed by this change (218f97578b26f7a89f7f8ed0748c31ef0181f80a). ----- In preparation for removing support for and expressions, mark them as undesirable. As such, we will no longer implicitly create such expressions, but they still exist.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index c69c7c0..07b02c2 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2288,6 +2288,7 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) {
case Instruction::FMul:
case Instruction::FDiv:
case Instruction::FRem:
+ case Instruction::And:
return false;
case Instruction::Add:
case Instruction::Sub:
@@ -2295,7 +2296,6 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) {
case Instruction::Shl:
case Instruction::LShr:
case Instruction::AShr:
- case Instruction::And:
case Instruction::Or:
case Instruction::Xor:
return true;