diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa/_gen')
| -rw-r--r-- | src/cmd/compile/internal/ssa/_gen/LOONG64.rules | 3 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/_gen/LOONG64.rules b/src/cmd/compile/internal/ssa/_gen/LOONG64.rules index a40603e93d..9793e6cf34 100644 --- a/src/cmd/compile/internal/ssa/_gen/LOONG64.rules +++ b/src/cmd/compile/internal/ssa/_gen/LOONG64.rules @@ -773,6 +773,9 @@ (SUBF (NEGF (MULF x y)) z) && z.Block.Func.useFMA(v) => (FNMADDF x y z) (SUBD (NEGD (MULD x y)) z) && z.Block.Func.useFMA(v) => (FNMADDD x y z) +// Absorb conversion between 32 bit and 64 bit if both src and dst are 32 bit. +(MOVDF ((ABS|SQRT)D (MOVFD x))) => ((ABS|SQRT)F x) + // generic simplifications (ADDV x (NEGV y)) => (SUBV x y) (SUBV x (NEGV y)) => (ADDV x y) diff --git a/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go b/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go index 9fd5ede869..ba8c067951 100644 --- a/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go +++ b/src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go @@ -169,6 +169,7 @@ func init() { {name: "SQRTD", argLength: 1, reg: fp11, asm: "SQRTD"}, // sqrt(arg0), float64 {name: "SQRTF", argLength: 1, reg: fp11, asm: "SQRTF"}, // sqrt(arg0), float32 + {name: "ABSF", argLength: 1, reg: fp11, asm: "ABSF"}, // abs(arg0), float32 {name: "ABSD", argLength: 1, reg: fp11, asm: "ABSD"}, // abs(arg0), float64 {name: "CLZW", argLength: 1, reg: gp11, asm: "CLZW"}, // Count leading (high order) zeroes (returns 0-32) |
