Commit b638760d authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: consider full number of struct components to deciding on inlining ==

Change-Id: I6bfbbce2ec5dfc7f9f99dbd82e51c2b0edacc87a
Reviewed-on: https://go-review.googlesource.com/59334
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 598950ca
......@@ -3298,7 +3298,7 @@ func walkcompare(n *Node, init *Nodes) *Node {
// We can compare several elements at once with 2/4/8 byte integer compares
inline = t.NumElem() <= 1 || (issimple[t.Elem().Etype] && (t.NumElem() <= 4 || t.Elem().Width*t.NumElem() <= maxcmpsize))
case TSTRUCT:
inline = t.NumFields() <= 4
inline = t.NumComponents() <= 4
}
cmpl := n.Left
......
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