http://bugs.llvm.org/show_bug.cgi?id=20934
Simon Pilgrim <llvm-...@redking.me.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
CC| |llvm-...@redking.me.uk
--- Comment #3 from Simon Pilgrim <llvm-...@redking.me.uk> ---
Clang 3.5 (-O1) codegen:
func1(): # @func1()
subq $24, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq (%rsp), %rdi
callq test(void const*)
addq $24, %rsp
retq
func2(): # @func2()
subq $24, %rsp
movups .L_ZZ5func2vE4Bits(%rip), %xmm0
movaps %xmm0, (%rsp)
leaq (%rsp), %rdi
callq test(void const*)
addq $24, %rsp
retq
.L_ZZ5func2vE4Bits:
.quad 0 # 0x0
.long 0 # 0x0
.zero 4
This was fixed in Clang 3.6:
func1(): # @func1()
subq $24, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq (%rsp), %rdi
callq test(void const*)
addq $24, %rsp
retq
func2(): # @func2()
subq $24, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq (%rsp), %rdi
callq test(void const*)
addq $24, %rsp
retq
And by clang trunk (r301105) has also avoided that unnecessary LEA:
func1(): # @func1()
subq $24, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rsp, %rdi
callq test(void const*)
addq $24, %rsp
retq
func2(): # @func2()
subq $24, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rsp, %rdi
callq test(void const*)
addq $24, %rsp
retq
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs