llvm.org GIT mirror llvm / ea1cddf
the mid-level optimizer removes this stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47108 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 0 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
4040 addl $12, %esp
4141 ret $4
4242
43 //===---------------------------------------------------------------------===//
44
45 int main() {
46 __m64 A[1] = { _mm_cvtsi32_si64(1) };
47 __m64 B[1] = { _mm_cvtsi32_si64(10) };
48 __m64 sum = _mm_cvtsi32_si64(0);
49
50 sum = __builtin_ia32_paddq(__builtin_ia32_paddq(A[0], B[0]), sum);
51
52 printf("Sum = %d\n", _mm_cvtsi64_si32(sum));
53 return 0;
54 }
55
56 Generates:
57
58 movl $11, %eax
59 ### movd %eax, %mm0
60 ### movq %mm0, 8(%esp)
61 ### movl 8(%esp), %eax
62 movl %eax, 4(%esp)
63 movl $_str, (%esp)
64 call L_printf$stub
65 xorl %eax, %eax
66 addl $28, %esp
67
68 These instructions are unnecessary.