diff options
author | Ruixin(Peter) Bao <ruixin.bao@ibm.com> | 2019-11-26 10:52:43 -0500 |
---|---|---|
committer | Michael Munday <mike.munday@ibm.com> | 2020-02-29 21:37:47 +0000 |
commit | 2962c96c9f24b685c86133cdd7612026827278d8 (patch) | |
tree | d597488f9220fcb6b1a97cdedd9abccf8afd7c85 /src/cmd/compile/internal/ssa/rewriteS390X.go | |
parent | ba0e651130cfe0a8fc8ab2845b2f7c6ae44db1e1 (diff) | |
download | go-2962c96c9f24b685c86133cdd7612026827278d8.tar.gz go-2962c96c9f24b685c86133cdd7612026827278d8.zip |
cmd/compile: lower float to uint conversions on s390x
Add rules for lowering float <-> unsigned int on s390x.
During compilation,
Cvt64Uto64F rule triggers around 80 times,
Cvt64Fto64U rule triggers around 20 times,
Cvt64Uto32F rule triggers around 5 times.
Change-Id: If4c9d128b9132fce8c0bea9abc09cb43a5df7989
Reviewed-on: https://go-review.googlesource.com/c/go/+/209177
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteS390X.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteS390X.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteS390X.go b/src/cmd/compile/internal/ssa/rewriteS390X.go index 2195f6aa1e..4fc90128d0 100644 --- a/src/cmd/compile/internal/ssa/rewriteS390X.go +++ b/src/cmd/compile/internal/ssa/rewriteS390X.go @@ -156,12 +156,24 @@ func rewriteValueS390X(v *Value) bool { case OpCvt32Fto32: v.Op = OpS390XCFEBRA return true + case OpCvt32Fto32U: + v.Op = OpS390XCLFEBR + return true case OpCvt32Fto64: v.Op = OpS390XCGEBRA return true case OpCvt32Fto64F: v.Op = OpS390XLDEBR return true + case OpCvt32Fto64U: + v.Op = OpS390XCLGEBR + return true + case OpCvt32Uto32F: + v.Op = OpS390XCELFBR + return true + case OpCvt32Uto64F: + v.Op = OpS390XCDLFBR + return true case OpCvt32to32F: v.Op = OpS390XCEFBRA return true @@ -174,9 +186,21 @@ func rewriteValueS390X(v *Value) bool { case OpCvt64Fto32F: v.Op = OpS390XLEDBR return true + case OpCvt64Fto32U: + v.Op = OpS390XCLFDBR + return true case OpCvt64Fto64: v.Op = OpS390XCGDBRA return true + case OpCvt64Fto64U: + v.Op = OpS390XCLGDBR + return true + case OpCvt64Uto32F: + v.Op = OpS390XCELGBR + return true + case OpCvt64Uto64F: + v.Op = OpS390XCDLGBR + return true case OpCvt64to32F: v.Op = OpS390XCEGBRA return true |