aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.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/ConstantFold.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/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 04e4217..db1a83b 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -1243,6 +1243,8 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
case Instruction::Add:
case Instruction::Sub:
return ConstantExpr::getXor(C1, C2);
+ case Instruction::Mul:
+ return ConstantExpr::getAnd(C1, C2);
case Instruction::Shl:
case Instruction::LShr:
case Instruction::AShr: