diff options
author | Nikita Popov <npopov@redhat.com> | 2024-06-19 09:10:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 09:10:28 +0200 |
commit | 6c01011db089bae22630922e1ac30e5d49de3137 (patch) | |
tree | d5055b39ebc1fc308353623b6e4e50dee34e2e07 /llvm/lib/IR/Constants.cpp | |
parent | cb20d4d2054e72a2564572a74f34ca01cb791cbf (diff) | |
download | llvm-6c01011db089bae22630922e1ac30e5d49de3137.zip llvm-6c01011db089bae22630922e1ac30e5d49de3137.tar.gz llvm-6c01011db089bae22630922e1ac30e5d49de3137.tar.bz2 |
[IR] Mark shl constant expression as undesirable (#95940)
Mark shl constant expressions undesirable, so that they are no longer
automatically created by IRBuilder, constant folding, etc.
This is in preparation for removing them entirely.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index d079073..fed3670 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -2324,11 +2324,11 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) { case Instruction::Or: case Instruction::LShr: case Instruction::AShr: + case Instruction::Shl: return false; case Instruction::Add: case Instruction::Sub: case Instruction::Mul: - case Instruction::Shl: case Instruction::Xor: return true; default: |