- Jun 30, 2011
-
-
Eric Christopher authored
we didn't have an opcode for 64-bit constant or expressions. Fixes rdar://9692967 llvm-svn: 134121
-
- May 20, 2011
-
-
Stuart Hastings authored
rdar://problem/8614450 llvm-svn: 131746
-
- May 17, 2011
-
-
Eric Christopher authored
llvm-svn: 131459
-
Eric Christopher authored
Finishes off rdar://8470697 llvm-svn: 131458
-
Eric Christopher authored
llvm-svn: 131457
-
Eric Christopher authored
llvm-svn: 131456
-
- May 11, 2011
-
-
Eric Christopher authored
Part of rdar://8470697 llvm-svn: 131200
-
Eric Christopher authored
Next up: xor and and. Part of rdar://8470697 llvm-svn: 131171
-
- Apr 23, 2011
-
-
Benjamin Kramer authored
llvm-svn: 130053
-
- Apr 22, 2011
-
-
Benjamin Kramer authored
X86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & (C2 >> C1)) & C1. (Part of PR5039) This tends to happen a lot with bitfield code generated by clang. A simple example for x86_64 is uint64_t foo(uint64_t x) { return (x&1) << 42; } which used to compile into bloated code: shlq $42, %rdi ## encoding: [0x48,0xc1,0xe7,0x2a] movabsq $4398046511104, %rax ## encoding: [0x48,0xb8,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00] andq %rdi, %rax ## encoding: [0x48,0x21,0xf8] ret ## encoding: [0xc3] with this patch we can fold the immediate into the and: andq $1, %rdi ## encoding: [0x48,0x83,0xe7,0x01] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] shlq $42, %rax ## encoding: [0x48,0xc1,0xe0,0x2a] ret ## encoding: [0xc3] It's possible to save another byte by using 'andl' instead of 'andq' but I currently see no way of doing that without making this code even more complicated. See the TODOs in the code. llvm-svn: 129990
-
- Feb 16, 2011
-
-
Stuart Hastings authored
other getNode() methods. Radar 9002173. llvm-svn: 125665
-
- Feb 13, 2011
-
-
Chris Lattner authored
have their low bits set to zero. This allows us to optimize out explicit stack alignment code like in stack-align.ll:test4 when it is redundant. Doing this causes the code generator to start turning FI+cst into FI|cst all over the place, which is general goodness (that is the canonical form) except that various pieces of the code generator don't handle OR aggressively. Fix this by introducing a new SelectionDAG::isBaseWithConstantOffset predicate, and using it in places that are looking for ADD(X,CST). The ARM backend in particular was missing a lot of addressing mode folding opportunities around OR. llvm-svn: 125470
-
- Jan 27, 2011
-
-
NAKAMURA Takumi authored
CALL64 marks %xmm* as dead. llvm-svn: 124354
-
- Jan 16, 2011
-
-
Chris Lattner authored
into and/shift would cause nodes to move around and a dangling pointer to happen. The code tried to avoid this with a HandleSDNode, but got the details wrong. llvm-svn: 123578
-
- Jan 14, 2011
-
-
Ted Kremenek authored
declaration and its assignments. Found by clang static analyzer. llvm-svn: 123486
-
- Jan 06, 2011
-
-
Bill Wendling authored
beginning of the "main" function. The assembler complains about the invalid suffix for the 'call' instruction. The right instruction is "callq __main". Patch by KS Sreeram! llvm-svn: 122933
-
- Dec 21, 2010
-
-
Chris Lattner authored
something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
-
- 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 27, 2010
-
-
Dale Johannesen authored
memory, so a MachineMemOperand is useful (not propagated into the MachineInstr yet). No functional change except for dump output. llvm-svn: 117413
-
- Oct 06, 2010
-
-
Chris Lattner authored
(e.g. CMOVBE16rr instead of CMOVBErr16). llvm-svn: 115705
-
Chris Lattner authored
21 insertions(+), 53 deletions(-) Moar change coming before I switch the rest. llvm-svn: 115697
-
- Sep 22, 2010
-
-
Eric Christopher authored
needs to happen for darwin. llvm-svn: 114577
-
Chris Lattner authored
llvm-svn: 114529
-
Chris Lattner authored
llvm-svn: 114523
-
Chris Lattner authored
can access the stack due to how it is generated though. llvm-svn: 114522
-
Chris Lattner authored
used with stack slots, but hey, lets be safe. llvm-svn: 114521
-
Chris Lattner authored
llvm-svn: 114515
-
Chris Lattner authored
call through gs-relative memory now. llvm-svn: 114510
-
Chris Lattner authored
llvm-svn: 114508
-
Chris Lattner authored
by having X86DAGToDAGISel::SelectAddr get passed in the parent node of the operand match (the load/store/atomic op) and having it get the address space from that, instead of having special FS/GS addr mode operations that require duplicating the entire instruction set to support. This makes FS and GS relative accesses *far* more predictable and work much better. It also simplifies the X86 backend a bit, more to come. There is still a pending issue with nodes like ISD::PREFETCH and X86ISD::FLD, which really should be MemSDNode's but aren't. llvm-svn: 114491
-
- Sep 21, 2010
-
-
Chris Lattner authored
passed the root of the match, even though only a few patterns actually needed this (one in X86, several in ARM [which should be refactored anyway], and some in CellSPU that I don't feel like detangling). Instead of requiring all ComplexPatterns to take the dead root, have targets opt into getting the root by putting SDNPWantRoot on the ComplexPattern. llvm-svn: 114471
-
Chris Lattner authored
llvm-svn: 114468
-
Chris Lattner authored
SelectionDAG::getExtLoad overload, and eliminate it. llvm-svn: 114446
-
rdar://8453210Chris Lattner authored
For now, just disable folding the load into the call. llvm-svn: 114386
-
- Sep 04, 2010
-
-
Chris Lattner authored
llvm-svn: 113073
-
- Sep 03, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 112921
-
- Aug 25, 2010
-
-
Benjamin Kramer authored
llvm-svn: 112060
-
- Aug 05, 2010
-
-
Eli Friedman authored
llvm-svn: 110268
-
- Jul 09, 2010
-
-
Chris Lattner authored
like all other instructions, even though a segment is not allowed. This resolves a bunch of gross hacks in the encoder and makes LEA more consistent with the rest of the instruction set. No functionality change. llvm-svn: 107934
-
- Jul 08, 2010
-
-
Evan Cheng authored
llvm-svn: 107820
-