aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-07-20 14:31:18 +0200
committerNikita Popov <npopov@redhat.com>2023-07-31 09:54:24 +0200
commit063b37e7b40ace03184923213bc9ead6aadee540 (patch)
treea83dd8c929c2044997c421ccc6509549388dfcde /llvm/lib/IR/ConstantFold.cpp
parent893d3a61c0574a539f2c15206117e6535846aacb (diff)
downloadllvm-063b37e7b40ace03184923213bc9ead6aadee540.zip
llvm-063b37e7b40ace03184923213bc9ead6aadee540.tar.gz
llvm-063b37e7b40ace03184923213bc9ead6aadee540.tar.bz2
Reapply [IR] Mark and/or constant expressions as undesirable
Reapply after D156401, which stops PatternMatch from recognizing binop constant expressions, which should avoid the infinite loops and assertion failures this patch previously exposed. ----- In preparation for removing support for and/or expressions, mark them as undesirable. As such, we will no longer implicitly create such expressions, but they still exist.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index db1a83b..04e4217 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -1243,8 +1243,6 @@ 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: