- May 23, 2006
-
-
Evan Cheng authored
llvm-svn: 28440
-
Evan Cheng authored
FORMAL_ARGUMENTS nodes include a token operand. llvm-svn: 28439
-
Chris Lattner authored
return argument pops the hidden struct pointer if present, not the caller. For example, in this testcase: struct X { int D, E, F, G; }; struct X bar() { struct X a; a.D = 0; a.E = 1; a.F = 2; a.G = 3; return a; } void foo(struct X *P) { *P = bar(); } We used to emit: _foo: subl $28, %esp movl 32(%esp), %eax movl %eax, (%esp) call _bar addl $28, %esp ret _bar: movl 4(%esp), %eax movl $0, (%eax) movl $1, 4(%eax) movl $2, 8(%eax) movl $3, 12(%eax) ret This is correct on Linux/X86 but not Darwin/X86. With this patch, we now emit: _foo: subl $28, %esp movl 32(%esp), %eax movl %eax, (%esp) call _bar *** addl $24, %esp ret _bar: movl 4(%esp), %eax movl $0, (%eax) movl $1, 4(%eax) movl $2, 8(%eax) movl $3, 12(%eax) *** ret $4 For the record, GCC emits (which is functionally equivalent to our new code): _bar: movl 4(%esp), %eax movl $3, 12(%eax) movl $2, 8(%eax) movl $1, 4(%eax) movl $0, (%eax) ret $4 _foo: pushl %esi subl $40, %esp movl 48(%esp), %esi leal 16(%esp), %eax movl %eax, (%esp) call _bar subl $4, %esp movl 16(%esp), %eax movl %eax, (%esi) movl 20(%esp), %eax movl %eax, 4(%esi) movl 24(%esp), %eax movl %eax, 8(%esi) movl 28(%esp), %eax movl %eax, 12(%esi) addl $40, %esp popl %esi ret This fixes SingleSource/Benchmarks/CoyoteBench/fftbench with LLC and the JIT, and fixes the X86-backend portion of PR729. The CBE still needs to be updated. llvm-svn: 28438
-
- May 19, 2006
-
-
Chris Lattner authored
llvm-svn: 28409
-
- May 17, 2006
-
-
Evan Cheng authored
llvm-svn: 28357
-
- May 16, 2006
-
-
Chris Lattner authored
arguments at once. llvm-svn: 28327
-
Chris Lattner authored
llvm-svn: 28326
-
Evan Cheng authored
llvm-svn: 28324
-
Chris Lattner authored
it doesn't currently use/maintain the chain properly. Also, make the X86ISelLowering.cpp file 80-col clean. llvm-svn: 28320
-
- May 12, 2006
-
-
Chris Lattner authored
llvm-svn: 28265
-
- May 06, 2006
-
-
Chris Lattner authored
llvm-svn: 28139
-
- May 05, 2006
-
-
Chris Lattner authored
llvm-svn: 28131
-
- May 03, 2006
-
-
Owen Anderson authored
Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. This fixes PR 759. llvm-svn: 28074
-
- Apr 28, 2006
-
-
Evan Cheng authored
passing by value. llvm-svn: 28015
-
Evan Cheng authored
from each vector. e.g. shuffle(G1, G2, 7, 1, 5, 2) ==> movaps _G2, %xmm0 shufps $151, _G1, %xmm0 shufps $216, %xmm0, %xmm0 llvm-svn: 28011
-
Evan Cheng authored
FORMAL_ARGUMENTS SDOperand in the return result vector. llvm-svn: 28009
-
- Apr 27, 2006
-
-
Evan Cheng authored
for now. Patch contributed by Alexander Friedman. llvm-svn: 27994
-
Evan Cheng authored
llvm-svn: 27992
-
Evan Cheng authored
llvm-svn: 27989
-
Evan Cheng authored
llvm-svn: 27988
-
Evan Cheng authored
- Fixed vararg support. llvm-svn: 27985
-
- Apr 26, 2006
-
-
Evan Cheng authored
llvm-svn: 27980
-
Evan Cheng authored
llvm-svn: 27975
-
- Apr 25, 2006
-
-
Evan Cheng authored
llvm-svn: 27972
-
Evan Cheng authored
llvm-svn: 27961
-
- Apr 24, 2006
-
-
Evan Cheng authored
llvm-svn: 27959
-
- Apr 23, 2006
-
-
Evan Cheng authored
llvm-svn: 27953
-
- Apr 22, 2006
-
-
Nate Begeman authored
x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. llvm-svn: 27947
-
Evan Cheng authored
Don't do all the lowering stuff for 2-wide build_vector's. Also, minor optimization for shuffle of undef. llvm-svn: 27946
-
Evan Cheng authored
Fix a performance regression. Use {p}shuf* when there are only two distinct elements in a build_vector. llvm-svn: 27945
-
Evan Cheng authored
movd always clear the top 96 bits and movss does so when it's loading the value from memory. The net result is codegen for 4-wide shuffles is much improved. It is near optimal if one or more elements is a zero. e.g. __m128i test(int a, int b) { return _mm_set_epi32(0, 0, b, a); } compiles to _test: movd 8(%esp), %xmm1 movd 4(%esp), %xmm0 punpckldq %xmm1, %xmm0 ret compare to gcc: _test: subl $12, %esp movd 20(%esp), %xmm0 movd 16(%esp), %xmm1 punpckldq %xmm0, %xmm1 movq %xmm1, %xmm0 movhps LC0, %xmm0 addl $12, %esp ret or icc: _test: movd 4(%esp), %xmm0 #5.10 movd 8(%esp), %xmm3 #5.10 xorl %eax, %eax #5.10 movd %eax, %xmm1 #5.10 punpckldq %xmm1, %xmm0 #5.10 movd %eax, %xmm2 #5.10 punpckldq %xmm2, %xmm3 #5.10 punpckldq %xmm3, %xmm0 #5.10 ret #5.10 There are still room for improvement, for example the FP variant of the above example: __m128 test(float a, float b) { return _mm_set_ps(0.0, 0.0, b, a); } _test: movss 8(%esp), %xmm1 movss 4(%esp), %xmm0 unpcklps %xmm1, %xmm0 xorps %xmm1, %xmm1 movlhps %xmm1, %xmm0 ret The xorps and movlhps are unnecessary. This will require post legalizer optimization to handle. llvm-svn: 27939
-
- Apr 21, 2006
-
-
Evan Cheng authored
scalar value. e.g. _mm_set_epi32(0, a, 0, 0); ==> movd 4(%esp), %xmm0 pshufd $69, %xmm0, %xmm0 _mm_set_epi8(0, 0, 0, 0, 0, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ==> movzbw 4(%esp), %ax movzwl %ax, %eax pxor %xmm0, %xmm0 pinsrw $5, %eax, %xmm0 llvm-svn: 27923
-
- Apr 20, 2006
-
-
Evan Cheng authored
to a vector shuffle. - VECTOR_SHUFFLE lowering change in preparation for more efficient codegen of vector shuffle with zero (or any splat) vector. llvm-svn: 27875
-
Evan Cheng authored
but i64 is not. If possible, change a i64 op to a f64 (e.g. load, constant) and then cast it back. llvm-svn: 27849
-
Evan Cheng authored
llvm-svn: 27847
-
Evan Cheng authored
instructions. - Fixed a commute vector_shuff bug. llvm-svn: 27845
-
- Apr 19, 2006
-
-
Evan Cheng authored
llvm-svn: 27840
-
- Apr 18, 2006
-
-
Evan Cheng authored
llvm-svn: 27782
-
Evan Cheng authored
llvm-svn: 27779
-
- Apr 17, 2006
-
-
Evan Cheng authored
llvm-svn: 27768
-