[LLVMdev] Spilling & UNPCKLPS Question
David Greene
dag at cray.com
Fri Nov 20 12:49:51 PST 2009
I'm working on adding some more annotations to asm and I
cam across this odd construct generated for X86/split-vector-rem.ll:
movss %xmm0, 32(%rsp) # Scalar Spill
[...]
unpcklps 48(%rsp), %xmm0 # Vector Folded Reload
[...]
movaps %xmm0, 16(%rsp) # Vector Spill
[...]
unpcklps 32(%rsp), %xmm0 # Vector Folded Reload
How is this possibly legal? First we spill %xmm0 (a 32-bit value)
to a stack slot that's onlt 16 bits wide (the next $rsp offsets are 48
and 16). Then we load 64 bits from 32(%rsp) via unpcklps and consider it a
reload of the spill.
This seems really wrong. Can someone explain?
-Dave
More information about the llvm-dev
mailing list