]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: Use movups for xmm->xmm mov
authorIlya Tocar <ilya.tocar@intel.com>
Fri, 26 Feb 2016 13:48:16 +0000 (16:48 +0300)
committerDavid Chase <drchase@google.com>
Mon, 29 Feb 2016 14:23:44 +0000 (14:23 +0000)
Movups is 1 byte smaller than movapd that we currently use.

Change-Id: I22f771f066529352722a28543535ec43497cb9c5
Reviewed-on: https://go-review.googlesource.com/19938
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go

index 8e68c20fb48196822c10ddad8e39735add362538..b46016f1f2ffd99abe5d3ca6edbb5767e1245a21 100644 (file)
@@ -4999,7 +4999,9 @@ func moveByType(t ssa.Type) int {
        if t.IsFloat() {
                // Moving the whole sse2 register is faster
                // than moving just the correct low portion of it.
-               return x86.AMOVAPD
+               // There is no xmm->xmm move with 1 byte opcode,
+               // so use movups, which has 2 byte opcode.
+               return x86.AMOVUPS
        } else {
                switch t.Size() {
                case 1: