- Jan 31, 2006
-
-
Chris Lattner authored
llvm-svn: 25830
-
Chris Lattner authored
llvm-svn: 25829
-
Chris Lattner authored
llvm-svn: 25828
-
Chris Lattner authored
int %test_cpuid(int %op) { %B = alloca int %C = alloca int %D = alloca int %A = call int asm "cpuid", "=eax,==ebx,==ecx,==edx,eax"(int* %B, int* %C, int* %D, int %op) %Bv = load int* %B %Cv = load int* %C %Dv = load int* %D %x = add int %A, %Bv %y = add int %x, %Cv %z = add int %y, %Dv ret int %z } to this: _test_cpuid: sub %ESP, 16 mov DWORD PTR [%ESP], %EBX mov %EAX, DWORD PTR [%ESP + 20] cpuid mov DWORD PTR [%ESP + 8], %ECX mov DWORD PTR [%ESP + 12], %EBX mov DWORD PTR [%ESP + 4], %EDX mov %ECX, DWORD PTR [%ESP + 12] add %EAX, %ECX mov %ECX, DWORD PTR [%ESP + 8] add %EAX, %ECX mov %ECX, DWORD PTR [%ESP + 4] add %EAX, %ECX mov %EBX, DWORD PTR [%ESP] add %ESP, 16 ret ... note the proper register allocation. :) it is unclear to me why the loads aren't folded into the adds. llvm-svn: 25827
-
Chris Lattner authored
llvm-svn: 25826
-
Chris Lattner authored
llvm-svn: 25825
-
Evan Cheng authored
the order of the compare operands and generate SETOGT, SETOGE, SETUGE, and SETULE instead. llvm-svn: 25824
-
Evan Cheng authored
generate SETULT instead. llvm-svn: 25823
-
Chris Lattner authored
llvm-svn: 25822
-
- Jan 30, 2006
-
-
Chris Lattner authored
a chance to custom legalize setcc, which broke a bunch of C++ Codes. Testcase here: CodeGen/X86/2006-01-30-LongSetcc.ll llvm-svn: 25821
-
Chris Lattner authored
llvm-svn: 25820
-
Chris Lattner authored
llvm-svn: 25819
-
Evan Cheng authored
llvm-svn: 25818
-
Evan Cheng authored
conversions. SSE does not have instructions to handle these tasks. llvm-svn: 25817
-
Evan Cheng authored
llvm-svn: 25816
-
Chris Lattner authored
SPARC condition codes, not in terms of the DAG condcodes. This allows us to write nice clean patterns for cmovs/branches. llvm-svn: 25815
-
Chris Lattner authored
uint %test(uint %X) { %Y = call uint %llvm.ctpop.i32(uint %X) ret uint %Y } to: test: save -96, %o6, %o6 sll %i0, 0, %l0 popc %l0, %i0 restore %g0, %g0, %g0 retl nop instead of to 40 logical ops. Note the shift-by-zero that clears the top part of the 64-bit V9 register. Testcase here: CodeGen/SparcV8/ctpop.ll llvm-svn: 25814
-
Chris Lattner authored
llvm-svn: 25813
-
Chris Lattner authored
an instruction operation action to Expand, then set it to Legal later. llvm-svn: 25812
-
Chris Lattner authored
running it. llvm-svn: 25811
-
Chris Lattner authored
llvm-svn: 25810
-
Chris Lattner authored
patterns. This allows emission of this code: t1: save -96, %o6, %o6 subcc %i0, %i1, %l0 move %icc, %i0, %i2 or %g0, %i2, %i0 restore %g0, %g0, %g0 retl nop instead of this: t1: save -96, %o6, %o6 subcc %i0, %i1, %l0 be .LBBt1_2 ! nop .LBBt1_1: ! or %g0, %i2, %i0 .LBBt1_2: ! restore %g0, %g0, %g0 retl nop for this: int %t1(int %a, int %b, int %c) { %tmp.2 = seteq int %a, %b %tmp3 = select bool %tmp.2, int %a, int %c ret int %tmp3 } llvm-svn: 25809
-
Chris Lattner authored
1. Default to having V9 instructions, instead of just V8. 2. unless -enable-sparc-v9-insts is passed, disable V9 (for use with llcbeta) llvm-svn: 25807
-
Chris Lattner authored
the two operations together. This allows us to compile this: void %two(int %a, int* %b) { %tmp.2 = seteq int %a, 0 %tmp.0.0 = select bool %tmp.2, int 10, int 20 store int %tmp.0.0, int* %b ret void } into: two: save -96, %o6, %o6 or %g0, 20, %l0 or %g0, 10, %l1 subcc %i0, 0, %l2 be .LBBtwo_2 ! entry nop .LBBtwo_1: ! entry or %g0, %l0, %l1 .LBBtwo_2: ! entry st %l1, [%i1] restore %g0, %g0, %g0 retl nop instead of: two: save -96, %o6, %o6 sethi 0, %l0 or %g0, 1, %l1 or %g0, 20, %l2 or %g0, 10, %l3 subcc %i0, 0, %l4 be .LBBtwo_2 ! entry nop .LBBtwo_1: ! entry or %g0, %l0, %l1 .LBBtwo_2: ! entry subcc %l1, 0, %l0 bne .LBBtwo_4 ! entry nop .LBBtwo_3: ! entry or %g0, %l2, %l3 .LBBtwo_4: ! entry st %l3, [%i1] restore %g0, %g0, %g0 retl nop llvm-svn: 25806
-
Jeff Cohen authored
of being unable to search for symbols in an EXE. It will also allow other existing hacks to be improved. llvm-svn: 25805
-
Chris Lattner authored
of lowered target nodes. llvm-svn: 25804
-
Chris Lattner authored
Move MaskedValueIsZero from the DAGCombiner to the TargetLowering interface,making isMaskedValueZeroForTargetNode simpler, and useable from other partsof the compiler. llvm-svn: 25803
-
Chris Lattner authored
making isMaskedValueZeroForTargetNode simpler, and useable from other parts of the compiler. llvm-svn: 25802
-
Jeff Cohen authored
llvm-svn: 25801
-
Chris Lattner authored
allowing redundant and's to be eliminated by the dag combiner. llvm-svn: 25800
-
Chris Lattner authored
to permit recursion llvm-svn: 25799
-
Chris Lattner authored
llvm-svn: 25798
-
Chris Lattner authored
llvm-svn: 25797
-
Chris Lattner authored
llvm-svn: 25796
-
- Jan 29, 2006
-
-
Jeff Cohen authored
llvm-svn: 25795
-
Chris Lattner authored
llvm-svn: 25794
-
Chris Lattner authored
This fixes llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c and PR704 llvm-svn: 25793
-
Chris Lattner authored
llvm-svn: 25791
-
Jim Laskey authored
llvm-svn: 25790
-
Chris Lattner authored
llvm-svn: 25789
-