diff options
author | Nikita Popov <npopov@redhat.com> | 2023-11-07 10:37:37 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-11-07 10:42:14 +0100 |
commit | 0a362f12ec60a49a054befec8620a8e69523af54 (patch) | |
tree | 775b1f4d2cb3458fafda6d2926999c1f5a7d8f86 /llvm/lib/IR/Constants.cpp | |
parent | 2c4f938f1c01794d9b944c24e9067eac6763e95c (diff) | |
download | llvm-0a362f12ec60a49a054befec8620a8e69523af54.zip llvm-0a362f12ec60a49a054befec8620a8e69523af54.tar.gz llvm-0a362f12ec60a49a054befec8620a8e69523af54.tar.bz2 |
[IR] Mark mul and ashr const exprs as undesirable
These will no longer be created by default, but can still be
created explicitly.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index 4e48069..0005b2f 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: |