aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-11-07 11:16:10 +0100
committerNikita Popov <npopov@redhat.com>2023-11-07 11:16:10 +0100
commitc82cc62387c84877ef2a08f12e9be89ef1c33000 (patch)
tree73d53c3f31a4307e4d7760a4481c63cb22e4e7b6 /llvm/lib/IR/Constants.cpp
parentd1ee26ba9f51dcb09074a0a038992b7d36f4917a (diff)
downloadllvm-c82cc62387c84877ef2a08f12e9be89ef1c33000.zip
llvm-c82cc62387c84877ef2a08f12e9be89ef1c33000.tar.gz
llvm-c82cc62387c84877ef2a08f12e9be89ef1c33000.tar.bz2
Revert "[IR] Mark mul and ashr const exprs as undesirable"
This reverts commit 0a362f12ec60a49a054befec8620a8e69523af54. This causes test failures in flang.
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 0005b2f..4e48069 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2133,13 +2133,13 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) {
case Instruction::FRem:
case Instruction::And:
case Instruction::Or:
- case Instruction::Mul:
- case Instruction::AShr:
return false;
case Instruction::Add:
case Instruction::Sub:
+ case Instruction::Mul:
case Instruction::Shl:
case Instruction::LShr:
+ case Instruction::AShr:
case Instruction::Xor:
return true;
default: