aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-07-21 15:23:08 -0700
committerNathan Chancellor <nathan@kernel.org>2023-07-21 15:57:03 -0700
commit17f4f262fc5c4361cf43e91f2137ff7b2dcadc62 (patch)
tree43a3622bc366a7c2072ed6496a7c75efce924d41 /llvm/lib/IR/Constants.cpp
parent6398b687c516d27778a570635d6f2fe1c145cb18 (diff)
downloadllvm-17f4f262fc5c4361cf43e91f2137ff7b2dcadc62.zip
llvm-17f4f262fc5c4361cf43e91f2137ff7b2dcadc62.tar.gz
llvm-17f4f262fc5c4361cf43e91f2137ff7b2dcadc62.tar.bz2
Revert "Reapply [IR] Mark and constant expressions as undesirable"
This reverts commit 086ee99564afbb11449c08ea2e094f7f49fadde5. This patch causes an infinite loop when building arch/mips/mm/c-r4k.c in the Linux kernel. See the comment in Phabricator for a reduced reproducer: https://reviews.llvm.org/rG086ee99564afbb11449c08ea2e094f7f49fadde5
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 07b02c2..c69c7c0 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2288,7 +2288,6 @@ 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:
@@ -2296,6 +2295,7 @@ 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;