Skip to content

Commit 0a362f1

Browse files
committed
[IR] Mark mul and ashr const exprs as undesirable
These will no longer be created by default, but can still be created explicitly.
1 parent 2c4f938 commit 0a362f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/Constants.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,13 +2133,13 @@ bool ConstantExpr::isDesirableBinOp(unsigned Opcode) {
21332133
case Instruction::FRem:
21342134
case Instruction::And:
21352135
case Instruction::Or:
2136+
case Instruction::Mul:
2137+
case Instruction::AShr:
21362138
return false;
21372139
case Instruction::Add:
21382140
case Instruction::Sub:
2139-
case Instruction::Mul:
21402141
case Instruction::Shl:
21412142
case Instruction::LShr:
2142-
case Instruction::AShr:
21432143
case Instruction::Xor:
21442144
return true;
21452145
default:

0 commit comments

Comments
 (0)