- Aug 03, 2007
-
-
Chris Lattner authored
llvm-svn: 40780
-
Chris Lattner authored
like this: typedef __attribute__(( ocu_vector_type(4) )) float float4; float4 test1(float4 V) { return V.wzyx+V; } to: _test1: pshufd $27, %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, %xmm0 ret and: _test1: mfspr r2, 256 oris r3, r2, 4096 mtspr 256, r3 li r3, lo16(LCPI1_0) lis r4, ha16(LCPI1_0) lvx v3, r4, r3 vperm v3, v2, v2, v3 vaddfp v2, v3, v2 mtspr 256, r2 blr llvm-svn: 40771
-
Chris Lattner authored
We can now codegen: vec4.xy; as nothing! llvm-svn: 40769
-
- Jul 21, 2007
-
-
Anders Carlsson authored
llvm-svn: 40162
-
- Jul 18, 2007
-
-
Chris Lattner authored
llvm-svn: 40009
-
- Jul 16, 2007
-
-
Chris Lattner authored
llvm-svn: 39927
-
- Jul 13, 2007
-
-
Chris Lattner authored
llvm-svn: 39831
-
Chris Lattner authored
Both in one patch, and the test case that Chris didn't commit last time is in there too... I'll split the patch up if somebody wants it split." Patch by Keith Bauer. llvm-svn: 39796
-
Chris Lattner authored
Keith Bauer. llvm-svn: 39793
-
- Jul 12, 2007
-
-
Chris Lattner authored
llvm-svn: 39765
-
- Jul 10, 2007
-
-
Chris Lattner authored
float4 test(void); float test2() { return test()[1]; } llvm-svn: 39725
-
Chris Lattner authored
llvm-svn: 39724
-
Chris Lattner authored
llvm-svn: 39718
-
- Jun 29, 2007
-
-
Chris Lattner authored
llvm-svn: 39713
-
Chris Lattner authored
llvm-svn: 39712
-
Chris Lattner authored
llvm-svn: 39711
-
Chris Lattner authored
codegen support for +=. llvm-svn: 39710
-
- Jun 23, 2007
-
-
Chris Lattner authored
llvm-svn: 39674
-
- Jun 22, 2007
-
-
Chris Lattner authored
of complex. We now produce optimal code for: void test(_Complex float *Y) { *Y = *Y + *Y; } $ clang -emit-llvm cg.c | llvm-as | opt -std-compile-opts | llc -march=x86-64 ... _test: movss (%rdi), %xmm0 addss %xmm0, %xmm0 movss 4(%rdi), %xmm1 movss %xmm0, (%rdi) addss %xmm1, %xmm1 movss %xmm1, 4(%rdi) ret llvm-svn: 39673
-
Chris Lattner authored
llvm-svn: 39671
-
Chris Lattner authored
void test(int A, _Complex float Y) { _Complex float X; X = X; } llvm-svn: 39669
-
- Jun 20, 2007
-
-
Chris Lattner authored
One major FIXME though. llvm-svn: 39666
-
Chris Lattner authored
llvm-svn: 39665
-
- Jun 16, 2007
-
-
Chris Lattner authored
and globals. llvm-svn: 39661
-
Chris Lattner authored
is ready. llvm-svn: 39660
-
Chris Lattner authored
out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
-
- Jun 15, 2007
-
-
Chris Lattner authored
double foo( int (*FP)(int, int, int)) { return FP(1, 2, 3); } to: define double @foo(i32 (i32, i32, i32)* %FP) { entry: %call = tail call i32 %FP( i32 1, i32 2, i32 3 ) %conv = sitofp i32 %call to double ret double %conv } llvm-svn: 39658
-
- Jun 13, 2007
-
-
Chris Lattner authored
int test(int X, short Y, float Z) { return (int)(X*Y+Z); } to: define i32 @test(i32 %X, i16 %Y, float %Z) { entry: %promote = sext i16 %Y to i32 ; <i32> [#uses=1] %mul = mul i32 %promote, %X ; <i32> [#uses=1] %promote3 = sitofp i32 %mul to float ; <float> [#uses=1] %add = add float %promote3, %Z ; <float> [#uses=1] %conv = fptosi float %add to i32 ; <i32> [#uses=1] ret i32 %conv } with: $ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis llvm-svn: 39652
-
- Jun 09, 2007
-
-
Chris Lattner authored
llvm-svn: 39625
-
Chris Lattner authored
stuff like: void test() { int *X, Y, *Z[14]; X[Y] = 4; } llvm-svn: 39624
-
Chris Lattner authored
llvm-svn: 39622
-
- Jun 06, 2007
-
-
Chris Lattner authored
llvm-svn: 39597
-
Chris Lattner authored
llvm-svn: 39595
-
- Jun 05, 2007
-
-
Chris Lattner authored
llvm-svn: 39593
-
Chris Lattner authored
llvm-svn: 39582
-
- Jun 03, 2007
-
-
Chris Lattner authored
ints to long long etc. For int to longlong, we now get: %tmp = load i64* %F ; <i64> [#uses=1] %tmp1 = load i32* %D ; <i32> [#uses=1] %promote = sext i32 %tmp1 to i64 ; <i64> [#uses=1] %tmp2 = add i64 %tmp, %promote ; <i64> [#uses=0] llvm-svn: 39576
-
Chris Lattner authored
This allows us to compile: int func() { int A[10]; if (!A) { to: define i32 @func() { entry: %A = alloca [10 x i32] ; <[10 x i32]*> [#uses=1] %arraydecay = getelementptr [10 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1] %tobool = icmp ne i32* %arraydecay, null ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] br i1 %lnot, label %ifthen, label %ifend -Chris llvm-svn: 39564
-
- Jun 02, 2007
-
-
Chris Lattner authored
compile: void foo() { int A[10]; int *P; into: entry: %A = alloca [10 x i32] ; <[10 x i32]*> [#uses=0] %P = alloca i32* ; <i32**> [#uses=0] llvm-svn: 39561
-
Chris Lattner authored
be shared. Implement infrastructure for unary operator emission. Implement basic logical not support. We now compile: register short X; if (!X) { into: %tmp = load i16* %X ; <i16> [#uses=1] %tobool = icmp ne i16 %tmp, 0 ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] zext i1 %lnot to i32 ; <i32>:0 [#uses=1] %tobool1 = icmp ne i32 %0, 0 ; <i1> [#uses=1] br i1 %tobool1, label %ifthen, label %ifend llvm-svn: 39559
-
Chris Lattner authored
This allows us to translate: int func() { register int X; { int Y; return 1+X+Y; } } into: define i32 @func() { entry: %X = alloca i32 ; <i32*> [#uses=1] %Y = alloca i32 ; <i32*> [#uses=1] %allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0] %tmp = load i32* %X ; <i32> [#uses=1] %tmp1 = add i32 1, %tmp ; <i32> [#uses=1] %tmp2 = load i32* %Y ; <i32> [#uses=1] %tmp3 = add i32 %tmp1, %tmp2 ; <i32> [#uses=1] ret i32 %tmp3 ; No predecessors! ret i32 undef } llvm-svn: 39555
-