mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
[Reassociate] Canonicalize negative constants out of expressions.
Add support for FDiv, which was regressed by the previous commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1955,7 +1955,8 @@ Instruction *Reassociate::canonicalizeNegConstExpr(Instruction *I) {
|
||||
|
||||
// Must be a mul instruction.
|
||||
unsigned Opcode = I->getOpcode();
|
||||
if (Opcode != Instruction::Mul && Opcode != Instruction::FMul)
|
||||
if (Opcode != Instruction::Mul && Opcode != Instruction::FMul &&
|
||||
Opcode != Instruction::FDiv)
|
||||
return nullptr;
|
||||
|
||||
// Must have at least one constant operand.
|
||||
|
Reference in New Issue
Block a user