diff options
author | Nikita Popov <npopov@redhat.com> | 2023-07-20 14:31:18 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-07-20 15:24:19 +0200 |
commit | f8a36d8c3e264c4fccf8058e699201a452ea7bb7 (patch) | |
tree | 47bf91cdaa5cbd6cfcd5e2eae8e9ae83da705032 /llvm/lib/IR/Constants.cpp | |
parent | 632594fcb1c9b6a25da32a58cd7364ce02aec745 (diff) | |
download | llvm-f8a36d8c3e264c4fccf8058e699201a452ea7bb7.zip llvm-f8a36d8c3e264c4fccf8058e699201a452ea7bb7.tar.gz llvm-f8a36d8c3e264c4fccf8058e699201a452ea7bb7.tar.bz2 |
[IR] Mark add constant expressions as undesirable
In preparation for removing support for add 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/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 c69c7c0..07b02c2 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -2288,6 +2288,7 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) { case Instruction::FMul: case Instruction::FDiv: case Instruction::FRem: + case Instruction::And: return false; case Instruction::Add: case Instruction::Sub: @@ -2295,7 +2296,6 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) { case Instruction::Shl: case Instruction::LShr: case Instruction::AShr: - case Instruction::And: case Instruction::Or: case Instruction::Xor: return true; |