I got this using minimal loop:
```
  70:	f2 0f 10 07          	movsd  (%rdi),%xmm0
  74:	48 83 c7 08          	add    $0x8,%rdi
  78:	66 0f 2e 07          	ucomisd (%rdi),%xmm0
  7c:	77 12                	ja     90 <g+0x40>
  7e:	48 39 c7             	cmp    %rax,%rdi
  81:	75 ed                	jne    70 <g+0x20>
```

vs yours:

```
  20:	48 83 c7 08          	add    $0x8,%rdi
  24:	f2 0f 10 47 f8       	movsd  -0x8(%rdi),%xmm0
  29:	66 0f 2e c1          	ucomisd %xmm1,%xmm0
  2d:	77 11                	ja     40 <f+0x40>
  2f:	66 0f 28 c8          	movapd %xmm0,%xmm1
  33:	48 39 c7             	cmp    %rax,%rdi
  36:	75 e8                	jne    20 <f+0x20>
```

though the longer code is probably faster as avoids a memory to register move for a register register move the latter has lower latency even if its in the L1 cache. So you win :)