aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2023-11-10 17:04:53 -0800
committerShoaib Meenai <smeenai@fb.com>2023-11-10 17:08:35 -0800
commit8ee07a4be7f7d8654ecf25e7ce0a680975649544 (patch)
tree3e4d7e2f5a2d36125bf93099d9c3efdda7b930ce /llvm/lib/IR/Constants.cpp
parent754b93e4668fbe02a2e36e6c3e1afa52c5a53327 (diff)
downloadllvm-8ee07a4be7f7d8654ecf25e7ce0a680975649544.zip
llvm-8ee07a4be7f7d8654ecf25e7ce0a680975649544.tar.gz
llvm-8ee07a4be7f7d8654ecf25e7ce0a680975649544.tar.bz2
Revert "[IR] Mark lshr and ashr constant expressions as undesirable"
This reverts commit 82f68a992b9f89036042d57a5f6345cb2925b2c1. cd7ba9f3d090afb5d3b15b0dcf379d15d1e11e33 needs to be reverted to fix test failures on builds without assertions, and this one needs to be reverted first for that.
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 aab624b..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::LShr:
- 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: