Commit d8a0f748 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile/internal/gc: remove OHMUL Op

Previously the compiler rewrote constant division into OHMUL
operations, but that rewriting was moved to SSA in CL 37015. Now OHMUL
is unused, so we can get rid of it.

Change-Id: Ib6fc7c2b6435510bafb5735b3b4f42cfd8ed8cdb
Reviewed-on: https://go-review.googlesource.com/37750
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 77f64c50
...@@ -152,7 +152,6 @@ var opnames = []string{ ...@@ -152,7 +152,6 @@ var opnames = []string{
OVARKILL: "VARKILL", OVARKILL: "VARKILL",
OVARLIVE: "VARLIVE", OVARLIVE: "VARLIVE",
OINDREGSP: "INDREGSP", OINDREGSP: "INDREGSP",
OHMUL: "HMUL",
ORETJMP: "RETJMP", ORETJMP: "RETJMP",
OGETG: "GETG", OGETG: "GETG",
OEND: "END", OEND: "END",
......
...@@ -232,7 +232,6 @@ func instrumentnode(np **Node, init *Nodes, wr int, skip int) { ...@@ -232,7 +232,6 @@ func instrumentnode(np **Node, init *Nodes, wr int, skip int) {
OXOR, OXOR,
OSUB, OSUB,
OMUL, OMUL,
OHMUL,
OEQ, OEQ,
ONE, ONE,
OLT, OLT,
......
...@@ -1046,13 +1046,6 @@ var opToSSA = map[opAndType]ssa.Op{ ...@@ -1046,13 +1046,6 @@ var opToSSA = map[opAndType]ssa.Op{
opAndType{ODIV, TFLOAT32}: ssa.OpDiv32F, opAndType{ODIV, TFLOAT32}: ssa.OpDiv32F,
opAndType{ODIV, TFLOAT64}: ssa.OpDiv64F, opAndType{ODIV, TFLOAT64}: ssa.OpDiv64F,
opAndType{OHMUL, TINT8}: ssa.OpHmul8,
opAndType{OHMUL, TUINT8}: ssa.OpHmul8u,
opAndType{OHMUL, TINT16}: ssa.OpHmul16,
opAndType{OHMUL, TUINT16}: ssa.OpHmul16u,
opAndType{OHMUL, TINT32}: ssa.OpHmul32,
opAndType{OHMUL, TUINT32}: ssa.OpHmul32u,
opAndType{ODIV, TINT8}: ssa.OpDiv8, opAndType{ODIV, TINT8}: ssa.OpDiv8,
opAndType{ODIV, TUINT8}: ssa.OpDiv8u, opAndType{ODIV, TUINT8}: ssa.OpDiv8u,
opAndType{ODIV, TINT16}: ssa.OpDiv16, opAndType{ODIV, TINT16}: ssa.OpDiv16,
...@@ -1848,7 +1841,7 @@ func (s *state) expr(n *Node) *ssa.Value { ...@@ -1848,7 +1841,7 @@ func (s *state) expr(n *Node) *ssa.Value {
s.newValue2(op, pt, s.newValue1(ssa.OpComplexImag, pt, a), s.newValue1(ssa.OpComplexImag, pt, b))) s.newValue2(op, pt, s.newValue1(ssa.OpComplexImag, pt, a), s.newValue1(ssa.OpComplexImag, pt, b)))
} }
return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b) return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b)
case OAND, OOR, OHMUL, OXOR: case OAND, OOR, OXOR:
a := s.expr(n.Left) a := s.expr(n.Left)
b := s.expr(n.Right) b := s.expr(n.Right)
return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b) return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b)
......
...@@ -493,7 +493,6 @@ const ( ...@@ -493,7 +493,6 @@ const (
OINDREGSP // offset plus indirect of REGSP, such as 8(SP). OINDREGSP // offset plus indirect of REGSP, such as 8(SP).
// arch-specific opcodes // arch-specific opcodes
OHMUL // high mul: AMUL/AIMUL for unsigned/signed (OMUL uses AIMUL for both).
ORETJMP // return to other function ORETJMP // return to other function
OGETG // runtime.getg() (read g pointer) OGETG // runtime.getg() (read g pointer)
......
...@@ -521,7 +521,6 @@ OpSwitch: ...@@ -521,7 +521,6 @@ OpSwitch:
OEQ, OEQ,
OGE, OGE,
OGT, OGT,
OHMUL,
OLE, OLE,
OLT, OLT,
OLSH, OLSH,
......
...@@ -287,7 +287,6 @@ func typeinit() { ...@@ -287,7 +287,6 @@ func typeinit() {
okfor[OLE] = okforcmp[:] okfor[OLE] = okforcmp[:]
okfor[OLT] = okforcmp[:] okfor[OLT] = okforcmp[:]
okfor[OMOD] = okforand[:] okfor[OMOD] = okforand[:]
okfor[OHMUL] = okforarith[:]
okfor[OMUL] = okforarith[:] okfor[OMUL] = okforarith[:]
okfor[ONE] = okforeq[:] okfor[ONE] = okforeq[:]
okfor[OOR] = okforand[:] okfor[OOR] = okforand[:]
......
...@@ -565,7 +565,6 @@ opswitch: ...@@ -565,7 +565,6 @@ opswitch:
case OAND, case OAND,
OSUB, OSUB,
OHMUL,
OMUL, OMUL,
OLT, OLT,
OLE, OLE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment