llvm.org GIT mirror llvm / 779aee1
Add a note. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65275 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
1 changed file(s) with 28 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4040 addl $12, %esp
4141 ret $4
4242
43 //===---------------------------------------------------------------------===//
44
45 We generate crappy code for this:
46
47 __m64 t() {
48 return _mm_cvtsi32_si64(1);
49 }
50
51 _t:
52 subl $12, %esp
53 movl $1, %eax
54 movd %eax, %mm0
55 movq %mm0, (%esp)
56 movl (%esp), %eax
57 movl 4(%esp), %edx
58 addl $12, %esp
59 ret
60
61 The extra stack traffic is covered in the previous entry. But the other reason
62 is we are not smart about materializing constants in MMX registers. With -m64
63
64 movl $1, %eax
65 movd %eax, %mm0
66 movd %mm0, %rax
67 ret
68
69 We should be using a constantpool load instead:
70 movq LC0(%rip), %rax