diff options
author | Nathan Chancellor <nathan@kernel.org> | 2023-07-21 15:23:08 -0700 |
---|---|---|
committer | Nathan Chancellor <nathan@kernel.org> | 2023-07-21 15:57:03 -0700 |
commit | 17f4f262fc5c4361cf43e91f2137ff7b2dcadc62 (patch) | |
tree | 43a3622bc366a7c2072ed6496a7c75efce924d41 /llvm/lib/IR/ConstantFold.cpp | |
parent | 6398b687c516d27778a570635d6f2fe1c145cb18 (diff) | |
download | llvm-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/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index 40b2187..4c33250 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -1241,6 +1241,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: |