- Dec 09, 2010
-
-
Eric Christopher authored
the output to the correct register. Fixes a hidden problem uncovered by the last patch where we'd try to DAG combine our MVT::Other node oddly. llvm-svn: 121358
-
Eric Christopher authored
llvm-svn: 121340
-
Eric Christopher authored
popping up at O0 when it wasn't folded and the fast allocator would complain. llvm-svn: 121330
-
Eric Christopher authored
llvm-svn: 121328
-
-
- Dec 07, 2010
-
-
NAKAMURA Takumi authored
Or, global symbols @Lxxxx might be treated as temporal symbol by MCSymbol. llvm-svn: 121103
-
- Dec 06, 2010
-
-
Rafael Espindola authored
freed data to be read. I will open a bug to track it being reenabled. llvm-svn: 121028
-
Rafael Espindola authored
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. llvm-svn: 121006
-
- Dec 05, 2010
-
-
Chris Lattner authored
result. This allows us to compile: void *test12(long count) { return new int[count]; } into: test12: movl $4, %ecx movq %rdi, %rax mulq %rcx movq $-1, %rdi cmovnoq %rax, %rdi jmp __Znam ## TAILCALL instead of: test12: movl $4, %ecx movq %rdi, %rax mulq %rcx seto %cl testb %cl, %cl movq $-1, %rdi cmoveq %rax, %rdi jmp __Znam Of course it would be even better if the regalloc inverted the cmov to 'cmovoq', which would eliminate the need for the 'movq %rdi, %rax'. llvm-svn: 120936
-
Chris Lattner authored
backend that they were all implemented except umul. This one fell back to the default implementation that did a hi/lo multiply and compared the top. Fix this to check the overflow flag that the 'mul' instruction sets, so we can avoid an explicit test. Now we compile: void *func(long count) { return new int[count]; } into: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] seto %cl ## encoding: [0x0f,0x90,0xc1] testb %cl, %cl ## encoding: [0x84,0xc9] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL instead of: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL Other than the silly seto+test, this is using the o bit directly, so it's going in the right direction. llvm-svn: 120935
-
Chris Lattner authored
select, inserting a not to compensate. Add a missing isZero check that I lost somehow. This improves codegen of: void *func(long count) { return new int[count]; } from: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL ## encoding: [0xeb,A] to: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] cmpq $1, %rdx ## encoding: [0x48,0x83,0xfa,0x01] sbbq %rdi, %rdi ## encoding: [0x48,0x19,0xff] notq %rdi ## encoding: [0x48,0xf7,0xd7] orq %rax, %rdi ## encoding: [0x48,0x09,0xc7] jmp __Znam ## TAILCALL ## encoding: [0xeb,A] llvm-svn: 120932
-
Chris Lattner authored
1. generalize (select (x == 0), -1, 0) -> (sign_bit (x - 1)) to: (select (x == 0), -1, y) -> (sign_bit (x - 1)) | y 2. Handle the identical pattern that happens with !=: (select (x != 0), y, -1) -> (sign_bit (x - 1)) | y cmov is often high latency and can't fold immediates or memory operands. For example for (x == 0) ? -1 : 1, before we got: < testb %sil, %sil < movl $-1, %ecx < movl $1, %eax < cmovel %ecx, %eax now we get: > cmpb $1, %sil > sbbl %eax, %eax > orl $1, %eax llvm-svn: 120929
-
Bill Wendling authored
llvm-svn: 120923
-
- Dec 04, 2010
-
-
Benjamin Kramer authored
- Also adds a new POPCNT subtarget feature that is currently enabled if the target supports SSE4.2 (nehalem) or SSE4A (barcelona). llvm-svn: 120917
-
Benjamin Kramer authored
llvm-svn: 120907
-
Rafael Espindola authored
foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. llvm-svn: 120889
-
- Dec 03, 2010
-
-
Nate Begeman authored
I'm unclear if the tests are actually correct or not, but reverting for now. llvm-svn: 120847
-
Nate Begeman authored
llvm-svn: 120844
-
Nate Begeman authored
it completely breaks scalar fp in xmm regs when AVX is enabled. llvm-svn: 120843
-
- Dec 02, 2010
-
-
Devang Patel authored
llvm-svn: 120630
-
- Dec 01, 2010
-
-
Evan Cheng authored
llvm-svn: 120622
-
Devang Patel authored
llvm-svn: 120580
-
Duncan Sands authored
The user (i.e. whoever generated a call to the intrinsic in the first place) is essentially asking for a particular instruction to be placed in the assembler. If that instruction won't execute on the target machine, that's their problem not ours. Two buildbots with processors that don't support SSE3 were barfing on the apm.ll test in CodeGen/X86 because of this assertion. llvm-svn: 120574
-
Evan Cheng authored
llvm-svn: 120549
-
Evan Cheng authored
legalization time. Since at legalization time there is no mapping from SDNode back to the corresponding LLVM instruction and the return SDNode is target specific, this requires a target hook to check for eligibility. Only x86 and ARM support this form of sibcall optimization right now. rdar://8707777 llvm-svn: 120501
-
- Nov 30, 2010
-
-
Eric Christopher authored
llvm-svn: 120470
-
Eric Christopher authored
while I'm in there. llvm-svn: 120466
-
Eric Christopher authored
llvm-svn: 120416
-
Eric Christopher authored
llvm-svn: 120415
-
Eric Christopher authored
it. llvm-svn: 120412
-
Eric Christopher authored
While I'm there, clean up too many \n even for me. llvm-svn: 120411
-
Eric Christopher authored
llvm-svn: 120410
-
Eric Christopher authored
Fixes PR8573. llvm-svn: 120404
-
- Nov 29, 2010
-
-
Michael J. Spencer authored
llvm-svn: 120298
-
- Nov 28, 2010
-
-
Rafael Espindola authored
llvm-svn: 120263
-
Chris Lattner authored
instructions. I choose to handle this with an asmparser hack, though it could be handled by changing all the instruction definitions to allow be "setneb" instead of "setne". The asm parser hack is better in this case, because we want the disassembler to produce setne, not setneb. llvm-svn: 120260
-
Rafael Espindola authored
and at least the 4 byte one will be needed to implement the .cfi_* directives. llvm-svn: 120240
-
Anton Korobeynikov authored
llvm-svn: 120229
-
Anton Korobeynikov authored
llvm-svn: 120228
-
- Nov 27, 2010
-
-
Rafael Espindola authored
llvm-svn: 120225
-