mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
match a reassociated form of fnmul. This implements CodeGen/ARM/fnmul.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f972db0f4f
commit
72939126d4
@ -27,6 +27,7 @@
|
||||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/CodeGen/SSARegMap.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -139,8 +139,7 @@ def FMULD : ADI<(ops DPR:$dst, DPR:$a, DPR:$b),
|
||||
def FMULS : ASI<(ops SPR:$dst, SPR:$a, SPR:$b),
|
||||
"fmuls $dst, $a, $b",
|
||||
[(set SPR:$dst, (fmul SPR:$a, SPR:$b))]>;
|
||||
|
||||
|
||||
|
||||
def FNMULD : ADI<(ops DPR:$dst, DPR:$a, DPR:$b),
|
||||
"fnmuld $dst, $a, $b",
|
||||
[(set DPR:$dst, (fneg (fmul DPR:$a, DPR:$b)))]>;
|
||||
@ -149,6 +148,13 @@ def FNMULS : ASI<(ops SPR:$dst, SPR:$a, SPR:$b),
|
||||
"fnmuls $dst, $a, $b",
|
||||
[(set SPR:$dst, (fneg (fmul SPR:$a, SPR:$b)))]>;
|
||||
|
||||
// Match reassociated forms only if not sign dependent rounding.
|
||||
def : Pat<(fmul (fneg DPR:$a), DPR:$b),
|
||||
(FNMULD DPR:$a, DPR:$b)>, Requires<[NoHonorSignDependentRounding]>;
|
||||
def : Pat<(fmul (fneg SPR:$a), SPR:$b),
|
||||
(FNMULS SPR:$a, SPR:$b)>, Requires<[NoHonorSignDependentRounding]>;
|
||||
|
||||
|
||||
def FSUBD : ADI<(ops DPR:$dst, DPR:$a, DPR:$b),
|
||||
"fsubd $dst, $a, $b",
|
||||
[(set DPR:$dst, (fsub DPR:$a, DPR:$b))]>;
|
||||
|
Loading…
Reference in New Issue
Block a user