- Aug 08, 2012
-
-
Manman Ren authored
We perform the following: 1> Use SUB instead of CMP for i8,i16,i32 and i64 in ISel lowering. 2> Modify MachineCSE to correctly handle implicit defs. 3> Convert SUB back to CMP if possible at peephole. Removed pattern matching of (a>b) ? (a-b):0 and like, since they are handled by peephole now. rdar://11873276 llvm-svn: 161462
-
- Jul 18, 2012
-
-
Manman Ren authored
Updated OptimizeCompare in peephole to remove redundant cmp against zero. We only remove Compare if CF and OF are not used. rdar://11855129 llvm-svn: 160454
-
- Jul 06, 2012
-
-
Manman Ren authored
For each Cmp, we check whether there is an earlier Sub which make Cmp redundant. We handle the case where SUB operates on the same source operands as Cmp, including the case where the two source operands are swapped. llvm-svn: 159838
-
- Jun 03, 2012
-
-
Manman Ren authored
llvm-svn: 157896
-
- Jun 01, 2012
-
-
Manman Ren authored
This patch will optimize the following: sub r1, r3 cmp r3, r1 or cmp r1, r3 bge L1 TO sub r1, r3 bge L1 or ble L1 If the branch instruction can use flag from "sub", then we can eliminate the "cmp" instruction. llvm-svn: 157831
-
- Apr 09, 2012
-
-
Preston Gurd authored
original patch to add itineraries, to X86InstrArithmetc.td. llvm-svn: 154320
-
- Feb 18, 2012
-
-
Jia Liu authored
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore. llvm-svn: 150878
-
- Feb 02, 2012
-
-
Andrew Trick authored
Adds an instruction itinerary to all x86 instructions, giving each a default latency of 1, using the InstrItinClass IIC_DEFAULT. Sets specific latencies for Atom for the instructions in files X86InstrCMovSetCC.td, X86InstrArithmetic.td, X86InstrControl.td, and X86InstrShiftRotate.td. The Atom latencies for the remainder of the x86 instructions will be set in subsequent patches. Adds a test to verify that the scheduler is working. Also changes the scheduling preference to "Hybrid" for i386 Atom, while leaving x86_64 as ILP. Patch by Preston Gurd! llvm-svn: 149558
-
- Oct 23, 2011
-
-
Craig Topper authored
llvm-svn: 142738
-
Craig Topper authored
llvm-svn: 142737
-
- Oct 14, 2011
-
-
Craig Topper authored
llvm-svn: 141947
-
- Oct 08, 2011
-
-
Jakob Stoklund Olesen authored
In 64-bit mode, sub_8bit_hi sub-registers can only be used by NOREX instructions. The COPY created from the EXTRACT_SUBREG DAG node cannot target all GR8 registers, only those in GR8_NOREX. TO enforce this, we ensure that all instructions using the EXTRACT_SUBREG are GR8_NOREX constrained. This fixes PR11088. llvm-svn: 141499
-
- Oct 02, 2011
-
-
Craig Topper authored
Fix some Intel syntax disassembly issues with instructions that implicitly use AL/AX/EAX/RAX such as ADD/SUB/ADC/SUBB/XOR/OR/AND/CMP/MOV/TEST. llvm-svn: 140974
-
- Sep 11, 2011
-
-
Craig Topper authored
llvm-svn: 139485
-
- Apr 15, 2011
-
-
Chris Lattner authored
Luis Felipe Strano Moraes! llvm-svn: 129558
-
- Dec 20, 2010
-
-
Chris Lattner authored
their carry depenedencies with MVT::Flag operands) and use clean and beautiful EFLAGS dependences instead. We do this by changing the modelling of SBB/ADC to have EFLAGS input and outputs (which is what requires the previous scheduler change) and change X86 ISelLowering to custom lower ADDC and friends down to X86ISD::ADD/ADC/SUB/SBB nodes. With the previous series of changes, this causes no changes in the testsuite, woo. llvm-svn: 122213
-
- Dec 05, 2010
-
-
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
-
- Oct 08, 2010
-
-
Chris Lattner authored
the i8 versions of instructions in some cases. In test6, we started generating: cmpq $0, -8(%rsp) ## encoding: [0x48,0x81,0x7c,0x24,0xf8,0x00,0x00,0x00,0x00] ## <MCInst #478 CMP64mi32 ## <MCOperand Reg:114> ## <MCOperand Imm:1> ## <MCOperand Reg:0> ## <MCOperand Imm:-8> ## <MCOperand Reg:0> ## <MCOperand Imm:0>> instead of: cmpq $0, -8(%rsp) ## encoding: [0x48,0x83,0x7c,0x24,0xf8,0x00] ## <MCInst #479 CMP64mi8 ## <MCOperand Reg:114> ## <MCOperand Imm:1> ## <MCOperand Reg:0> ## <MCOperand Imm:-8> ## <MCOperand Reg:0> ## <MCOperand Imm:0>> Fix this and add some comments. llvm-svn: 116053
-
- Oct 07, 2010
-
-
Chris Lattner authored
use. Since TEST is completely different than all other binops, don't define a multipattern for it. This completes factorization of binops. llvm-svn: 115982
-
Chris Lattner authored
llvm-svn: 115978
-
Chris Lattner authored
llvm-svn: 115968
-
Chris Lattner authored
llvm-svn: 115967
-
Chris Lattner authored
are not defined as returning EFLAGS (like add_flag and friends), the entire multipattern and several of the subclasses need to be cloned. This could be handled through better instantiation support in tblgen, but it isn't meta enough. llvm-svn: 115964
-
Chris Lattner authored
allowing us to convert ADD over. deletes 160 lines of .td file. llvm-svn: 115897
-
Chris Lattner authored
Start using ArithBinOpEFLAGS for OR, XOR, and SUB. This removes 500 lines from the .td file. Now AND/OR/XOR/SUB are all defined exactly the same way instead of being close relatives. llvm-svn: 115896
-
Chris Lattner authored
which instantiates the 34 versions of and all in one swoop. The BaseOpc/BaseOpc2/BaseOpc4 stuff should not be required, but tblgen's feeble brain explodes when I use Or4<BaseOpc>.V in the multipattern. No change in the generated .inc files. llvm-svn: 115893
-
Chris Lattner authored
This does change the generated .inc files to include the implicit use/def of eax. Since these instructions are only generated by the assembler and disassembler it doesn't actually matter though. llvm-svn: 115885
-
Chris Lattner authored
As usual, no change in generated .inc files. llvm-svn: 115882
-
Chris Lattner authored
llvm-svn: 115880
-
Chris Lattner authored
convert AND64ri32 to use BinOpRI. llvm-svn: 115878
-
- Oct 06, 2010
-
-
Chris Lattner authored
operand kind for immediates. Use these to define a new BinOpRI class and switch AND8/16/32ri over to it. AND64ri32 needs some more refactoring before it can make the switcheroo. llvm-svn: 115752
-
Chris Lattner authored
llvm-svn: 115748
-
Chris Lattner authored
that i8 operations are even and i16,i32,i64 operations have a low opcode bit set (they are odd). llvm-svn: 115747
-
Chris Lattner authored
llvm-svn: 115745
-
Chris Lattner authored
llvm-svn: 115744
-
Chris Lattner authored
gunk that goes along with an MVT (e.g. reg class, preferred load operation, memory operand) llvm-svn: 115727
-
Chris Lattner authored
that I need a heavier handed approach to get ultimate factorization. llvm-svn: 115726
-
Chris Lattner authored
!strconcat(!strconcat(!strconcat(!strconcat Simplify some x86 td files to use it. llvm-svn: 115719
-
Chris Lattner authored
register class, and use this to simplify use of BinOpRR. llvm-svn: 115716
-
Chris Lattner authored
llvm-svn: 115715
-