aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorMatthew Voss <matthew.voss@sony.com>2023-07-26 10:51:28 -0700
committerMatthew Voss <matthew.voss@sony.com>2023-07-26 12:54:07 -0700
commit380dbfd8cab0c48c46c01b519b908c6ef4d6e775 (patch)
tree38587440b7b6ae39d2dfa7243bff4b8217dd76b6 /llvm/lib/IR/Constants.cpp
parent2c26397f76d9b8d2a0dc8207eeca5b0d3216f3f0 (diff)
downloadllvm-380dbfd8cab0c48c46c01b519b908c6ef4d6e775.zip
llvm-380dbfd8cab0c48c46c01b519b908c6ef4d6e775.tar.gz
llvm-380dbfd8cab0c48c46c01b519b908c6ef4d6e775.tar.bz2
Revert "Reapply [IR] Mark and/or constant expressions as undesirable"
This reverts commit 0cab8d20417c0e2ccc1ffc5505e080126f5de8e6. Reverted due to an LTO crash. I've put a reduced test case here: https://github.com/llvm/llvm-project/issues/64114
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 8ea799f..c69c7c0 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2288,8 +2288,6 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) {
case Instruction::FMul:
case Instruction::FDiv:
case Instruction::FRem:
- case Instruction::And:
- case Instruction::Or:
return false;
case Instruction::Add:
case Instruction::Sub:
@@ -2297,6 +2295,8 @@ 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;
default: