summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* fix PR8514, a bug where the "heroic" transformation of shift/and Chris Lattner2011-01-161-13/+9
| | | | | | | | 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
* fix PR8981, a crash trying to form a conditional inc with a floating point ↵Chris Lattner2011-01-161-1/+2
| | | | | | compare. llvm-svn: 123560
* reapply my fix for PR8961 with a tweak to properly handleChris Lattner2011-01-161-1/+1
| | | | | | | multi-instruction sequences like calls. Many thanks to Jakob for finding a testcase. llvm-svn: 123559
* 'HiReg' is written but never read. Nuke itsTed Kremenek2011-01-141-5/+5
| | | | | | | | declaration and its assignments. Found by clang static analyzer. llvm-svn: 123486
* Add a possibility to switch between CFI directives- and table-based frame ↵Anton Korobeynikov2011-01-141-3/+3
| | | | | | description emission. Currently all the backends use table-based stuff. llvm-svn: 123476
* CleanupAnton Korobeynikov2011-01-141-6/+1
| | | | llvm-svn: 123475
* revert my fastisel patch again which apparently still gives theChris Lattner2011-01-141-1/+1
| | | | | | llvm-gcc-i386-linux-selfhost buildbot heartburn... llvm-svn: 123431
* reapply r123414 now that the botz are calmed down and the fix is already in.Chris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123427
* r123414 broke llvm-gcc bootstrap apparently, revertChris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123422
* fix PR8961 - a fast isel miscompilation where we'd insert a new instructionChris Lattner2011-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | after sext's generated for addressing that got folded. Previously we compiled test5 into: _test5: ## @test5 ## BB#0: movq -8(%rsp), %rax ## 8-byte Reload movq (%rdi,%rax), %rdi addq %rdx, %rdi movslq %esi, %rax movq %rax, -8(%rsp) ## 8-byte Spill movq %rdi, %rax ret which is insane and wrong. Now we produce: _test5: ## @test5 ## BB#0: movslq %esi, %rax movq (%rdi,%rax), %rax addq %rdx, %rax ret llvm-svn: 123414
* Fix a few more places that should use MBB::getLastNonDebugInstr().Jakob Stoklund Olesen2011-01-131-1/+1
| | | | llvm-svn: 123408
* Teach frame lowering to ignore debug values after the terminators.Jakob Stoklund Olesen2011-01-131-5/+6
| | | | llvm-svn: 123399
* Experiment with changing the default 32-bit linux stack alignment toEric Christopher2011-01-131-3/+3
| | | | | | 16 bytes for PR8969. Update all testcases accordingly. llvm-svn: 123367
* Fix PR8946, a missing reg/reg form of movdqu.Chris Lattner2011-01-111-0/+4
| | | | llvm-svn: 123242
* Update CMake stuffAnton Korobeynikov2011-01-101-1/+1
| | | | llvm-svn: 123171
* Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov2011-01-107-52/+57
| | | | | | and fixes here and there. llvm-svn: 123170
* Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.Jakob Stoklund Olesen2011-01-101-1/+1
| | | | | | | | These functions not longer assert when passed 0, but simply return false instead. No functional change intended. llvm-svn: 123155
* Fix the last virtual register enumerations.Jakob Stoklund Olesen2011-01-081-4/+4
| | | | llvm-svn: 123102
* Recognize inline asm 'rev /bin/bash, ' as a bswap intrinsic call.Evan Cheng2011-01-081-52/+42
| | | | llvm-svn: 123048
* Do not model all INLINEASM instructions as having unmodelled side effects.Evan Cheng2011-01-071-2/+2
| | | | | | | | | | Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. llvm-svn: 123044
* Revert r122955. It seems using movups to lower memcpy can cause massive ↵Evan Cheng2011-01-071-1/+5
| | | | | | regression (even on Nehalem) in edge cases. I also didn't see any real performance benefit. llvm-svn: 123015
* Correctly disassemble truncated asm.Rafael Espindola2011-01-061-2/+4
| | | | | | Patch by Richard Simth. llvm-svn: 122962
* Remove dead code and silence warnings.Benjamin Kramer2011-01-061-2/+0
| | | | llvm-svn: 122957
* Use movups to lower memcpy and memset even if it's not fast (like corei7).Evan Cheng2011-01-061-5/+1
| | | | | | | | The theory is it's still faster than a pair of movq / a quad of movl. This will probably hurt older chips like P4 but should run faster on current and future Intel processors. rdar://8817010 llvm-svn: 122955
* Re-implement r122936 with proper target hooks. Now getMaxStoresPerMemcpyEvan Cheng2011-01-061-3/+6
| | | | | | | etc. takes an option OptSize. If OptSize is true, it would return the inline limit for functions with attribute OptSize. llvm-svn: 122952
* PR8919 - LLVM incorrectly generates "_alloca" as the stack probing call. ThatBill Wendling2011-01-061-0/+2
| | | | | | | works only on MinGW32. On 64-bit, the function to call is "__chkstk". Patch by KS Sreeram! llvm-svn: 122934
* PR8918 - When used with MinGW64, LLVM generates a "calll __main" at theBill Wendling2011-01-061-2/+5
| | | | | | | | 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
* fix PR8900, a shuffle miscompilation. Patch by Nadav Rotem!Chris Lattner2011-01-051-4/+4
| | | | llvm-svn: 122921
* silence more self assignment warnings.Chris Lattner2011-01-051-3/+3
| | | | llvm-svn: 122920
* Use the EdgeBundles analysis in X86FloatingPoint instead of recomputing CFGJakob Stoklund Olesen2011-01-041-87/+14
| | | | | | bundles in the pass. llvm-svn: 122833
* Turn the EdgeBundles class into a stand-alone machine CFG analysis pass.Jakob Stoklund Olesen2011-01-041-0/+3
| | | | | | | | | | The analysis will be needed by both the greedy register allocator and the X86FloatingPoint pass. It only needs to be computed once when the CFG doesn't change. This pass is very fast, usually showing up as 0.0% wall time. llvm-svn: 122832
* Eliminate a warning compiling with llvm-gcc. (IMO theDale Johannesen2011-01-041-1/+1
| | | | | | warning is overzealous but gcc is what it is.) llvm-svn: 122829
* Use pushq / popq instead of subq $8, %rsp / addq $8, %rsp to adjust stack inEvan Cheng2011-01-032-11/+88
| | | | | | | | | | | prologue and epilogue if the adjustment is 8. Similarly, use pushl / popl if the adjustment is 4 in 32-bit mode. In the epilogue, takes care to pop to a caller-saved register that's not live at the exit (either return or tailcall instruction). rdar://8771137 llvm-svn: 122783
* Try to reuse the value when lowering memset.Benjamin Kramer2011-01-021-44/+0
| | | | | | | | | | This allows us to compile: void test(char *s, int a) { __builtin_memset(s, a, 15); } into 1 mul + 3 stores instead of 3 muls + 3 stores. llvm-svn: 122710
* A workaround for a bug in cmake 2.8.3 diagnosed on PR 8885.Oscar Fuentes2011-01-021-0/+5
| | | | llvm-svn: 122706
* update a bunch of entries.Chris Lattner2011-01-021-0/+37
| | | | llvm-svn: 122700
* Add support for the 'H' modifier.Rafael Espindola2011-01-011-0/+6
| | | | llvm-svn: 122667
* Add to the list of cmake files the object file, not the asm file. ThisOscar Fuentes2010-12-311-1/+1
| | | | | | | is necessary for executing the custom command that runs the assember. Fixes PR8877. llvm-svn: 122649
* Add another non-commutable instruction that gas accepts commuted forms for.Nick Lewycky2010-12-301-3/+4
| | | | | | Fixes PR8861. llvm-svn: 122641
* CMake: Add disabling optimization on MSVC8 and MSVC10 as workaround for some ↵NAKAMURA Takumi2010-12-291-1/+1
| | | | | | files in Target/ARM and Target/X86. llvm-svn: 122623
* Add support for the same encodings of the personality function that gnu asRafael Espindola2010-12-271-0/+1
| | | | | | supports. llvm-svn: 122577
* fix some sort of weird pastoChris Lattner2010-12-261-60/+0
| | | | llvm-svn: 122560
* add a noteChris Lattner2010-12-261-0/+91
| | | | llvm-svn: 122559
* Code clean up. No functionality change.Evan Cheng2010-12-231-49/+48
| | | | llvm-svn: 122528
* Flag -> Glue, the ongoing sagaChris Lattner2010-12-232-15/+15
| | | | llvm-svn: 122513
* Remove some obsolete README items, add a new one off the top of my head.Benjamin Kramer2010-12-231-78/+26
| | | | llvm-svn: 122495
* X86: Lower a select directly to a setcc_carry if possible.Benjamin Kramer2010-12-222-52/+17
| | | | | | | | | | | | | | | | | | int test(unsigned long a, unsigned long b) { return -(a < b); } compiles to _test: ## @test cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7] sbbl %eax, %eax ## encoding: [0x19,0xc0] ret ## encoding: [0xc3] instead of _test: ## @test xorl %ecx, %ecx ## encoding: [0x31,0xc9] cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7] movl $-1, %eax ## encoding: [0xb8,0xff,0xff,0xff,0xff] cmovael %ecx, %eax ## encoding: [0x0f,0x43,0xc1] ret ## encoding: [0xc3] llvm-svn: 122451
* Add some x86 specific dagcombines for conditional increments.Benjamin Kramer2010-12-211-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (add Y, (sete X, 0)) -> cmp X, 1; adc 0, Y (add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y (sub (sete X, 0), Y) -> cmp X, 1; sbb 0, Y (sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y for unsigned foo(unsigned a, unsigned b) { if (a == 0) b++; return b; } we now get: foo: cmpl $1, %edi movl %esi, %eax adcl $0, %eax ret instead of: foo: testl %edi, %edi sete %al movzbl %al, %eax addl %esi, %eax ret llvm-svn: 122364
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-213-20/+20
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
* Implement feedback from Bruno on making pblendvb an x86-specific ISD node in ↵Nate Begeman2010-12-204-11/+14
| | | | | | | | addition to being an intrinsic, and convert lowering to use it. Hopefully the pattern fragment is doing the right thing with XMM0, looks correct in testing. llvm-svn: 122277
OpenPOWER on IntegriCloud