summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* X86: Enable SSE memory intrinsics even when stack alignment is less than 16 ↵Benjamin Kramer2012-11-141-7/+2
| | | | | | | | | | | | | | | | | | bytes. The stack realignment code was fixed to work when there is stack realignment and a dynamic alloca is present so this shouldn't cause correctness issues anymore. Note that this also enables generation of AVX instructions for memset under the assumptions: - Unaligned loads/stores are always fast on CPUs supporting AVX - AVX is not slower than SSE We may need some tweaked heuristics if one of those assumptions turns out not to be true. Effectively reverts r58317. Part of PR2962. llvm-svn: 167967
* X86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.Jim Grosbach2012-11-142-9/+42
| | | | | | | | | | When an instruction as written requires 32-bit mode and we're assembling in 64-bit mode, or vice-versa, issue a more specific diagnostic about what's wrong. rdar://12700702 llvm-svn: 167937
* Factor out an overly replicated typecast. No functional change.Craig Topper2012-11-141-65/+66
| | | | llvm-svn: 167916
* Use TARGET2 relocation for TType references on ARM.Anton Korobeynikov2012-11-142-7/+7
| | | | | | | | Do some cleanup of the code while here. Inspired by patch by Logan Chien! llvm-svn: 167904
* X86: when constructing VZEXT_LOAD from other loads, makes sure its outputManman Ren2012-11-131-0/+12
| | | | | | | | | | | chain is correctly setup. As an example, if the original load must happen before later stores, we need to make sure the constructed VZEXT_LOAD is constrained to be before the stores. rdar://12684358 llvm-svn: 167859
* Fix PR14314Michael Liao2012-11-121-2/+2
| | | | | | | - Fix operand order for atomic sub, where the minuend is the value loaded from memory and the subtrahend is the parameter specified. llvm-svn: 167718
* Move some helper methods to being static functions in the implementation file.Craig Topper2012-11-112-20/+7
| | | | llvm-svn: 167696
* Remove unnecessary subtraction and addition by 1 around a couple for loops.Craig Topper2012-11-101-6/+6
| | | | llvm-svn: 167673
* Tidy up spacing. No functional change.Craig Topper2012-11-101-4/+4
| | | | llvm-svn: 167671
* Removed unimplemented method declaration.Craig Topper2012-11-101-1/+0
| | | | llvm-svn: 167670
* Simplify custom emitter code for pcmp(e/i)str(i/m) and make the helper ↵Craig Topper2012-11-102-96/+42
| | | | | | functions static. llvm-svn: 167669
* Cleanup pcmp(e/i)str(m/i) instruction definitions and load folding support.Craig Topper2012-11-104-161/+192
| | | | llvm-svn: 167652
* Switch FreeBSD/i386 back to 4byte stack alignment. This partiallyRoman Divacky2012-11-091-3/+3
| | | | | | reverts r126226. llvm-svn: 167632
* indentNadav Rotem2012-11-091-2/+2
| | | | llvm-svn: 167607
* Add support of RTM from TSX extensionMichael Liao2012-11-0811-46/+159
| | | | | | | | - Add RTM code generation support throught 3 X86 intrinsics: xbegin()/xend() to start/end a transaction region, and xabort() to abort a tranaction region llvm-svn: 167573
* Simplify code. No functionality change.Jakub Staszak2012-11-061-1/+1
| | | | llvm-svn: 167505
* Make the helper functions static. No functional change.Nadav Rotem2012-11-061-3/+5
| | | | llvm-svn: 167501
* CostModel: add another known vector trunc optimization.Nadav Rotem2012-11-061-0/+1
| | | | llvm-svn: 167488
* Cost Model: add tables for some avx type-conversion hacks.Nadav Rotem2012-11-062-2/+61
| | | | llvm-svn: 167480
* Remove tailing whitespacesMichael Liao2012-11-061-4/+4
| | | | llvm-svn: 167445
* Refactor the getTypeLegalizationCost interface. No functionality change.Nadav Rotem2012-11-051-6/+3
| | | | llvm-svn: 167422
* CostModel: Add tables for the common x86 compares.Nadav Rotem2012-11-052-8/+83
| | | | llvm-svn: 167421
* Suppress signed/unsigned comparison warning.Richard Smith2012-11-051-2/+2
| | | | llvm-svn: 167410
* Cost Model: Normalize the insert/extract index when splitting typesNadav Rotem2012-11-051-3/+20
| | | | llvm-svn: 167402
* Implement the cost of abnormal x86 instruction lowering as a table.Nadav Rotem2012-11-051-49/+37
| | | | llvm-svn: 167395
* Remove alignments from folding tables for scalar FMA4 instructions.Craig Topper2012-11-041-16/+16
| | | | llvm-svn: 167366
* X86 CostModel: Add support for a some of the common arithmetic instructions ↵Nadav Rotem2012-11-032-6/+73
| | | | | | for SSE4, AVX and AVX2. llvm-svn: 167347
* Add a stub for the x86 cost model impl. Implement a basic cost rule for ↵Nadav Rotem2012-11-022-2/+18
| | | | | | inserting/extracting from XMM registers. llvm-svn: 167333
* Revert the majority of the next patch in the address space series:Chandler Carruth2012-11-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r165941: Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. Despite this commit log, this change primarily changed stuff outside of VMCore, and those changes do not carry any tests for correctness (or even plausibility), and we have consistently found questionable or flat out incorrect cases in these changes. Most of them are probably correct, but we need to devise a system that makes it more clear when we have handled the address space concerns correctly, and ideally each pass that gets updated would receive an accompanying test case that exercises that pass specificaly w.r.t. alternate address spaces. However, from this commit, I have retained the new C API entry points. Those were an orthogonal change that probably should have been split apart, but they seem entirely good. In several places the changes were very obvious cleanups with no actual multiple address space code added; these I have not reverted when I spotted them. In a few other places there were merge conflicts due to a cleaner solution being implemented later, often not using address spaces at all. In those cases, I've preserved the new code which isn't address space dependent. This is part of my ongoing effort to clean out the partial address space code which carries high risk and low test coverage, and not likely to be finished before the 3.2 release looms closer. Duncan and I would both like to see the above issues addressed before we return to these changes. llvm-svn: 167222
* Revert the series of commits starting with r166578 which introduced theChandler Carruth2012-11-012-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder reported in PR14233. These commits also contained several problems that should really be addressed before they are re-committed. I have avoided reverting various cleanups to the DataLayout APIs that are reasonable to have moving forward in order to reduce the amount of churn, and minimize the number of commits that were reverted. I've also manually updated merge conflicts and manually arranged for the getIntPtrType function to stay in DataLayout and to be defined in a plausible way after this revert. Thanks to Duncan for working through this exact strategy with me, and Nick Lewycky for tracking down the really annoying crasher this triggered. (Test case to follow in its own commit.) After discussing with Duncan extensively, and based on a note from Micah, I'm going to continue to back out some more of the more problematic patches in this series in order to ensure we go into the LLVM 3.2 branch with a reasonable story here. I'll send a note to llvmdev explaining what's going on and why. Summary of reverted revisions: r166634: Fix a compiler warning with an unused variable. r166607: Add some cleanup to the DataLayout changes requested by Chandler. r166596: Revert "Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! r166591: Delete a directory that wasn't supposed to be checked in yet. r166578: Add in support for getIntPtrType to get the pointer type based on the address space. llvm-svn: 167221
* Cleanup another place redundant SP maintainedMichael Liao2012-11-011-4/+4
| | | | llvm-svn: 167209
* (For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization.Shuxin Yang2012-10-311-4/+29
| | | | | | | | | | | | The adc/sbb optimization is to able to convert following expression into a single adc/sbb instruction: (ult) ... = x + 1 // where the ult is unsigned-less-than comparison (ult) ... = x - 1 This change is to flip the "x >u y" (i.e. ugt comparison) in order to expose the adc/sbb opportunity. llvm-svn: 167180
* Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from ↵Craig Topper2012-10-311-0/+8
| | | | | | Cameron McInally. llvm-svn: 167106
* Clean up redundant SP register maintained in X86 TLIMichael Liao2012-10-312-12/+7
| | | | llvm-svn: 167104
* X86 SSE: update rsqrtss and rcpss to use two source operands andManman Ren2012-10-301-4/+39
| | | | | | | | | | | | the first source operand is tied to the destination operand. This is to accurately model the corresponding instructions where the upper bits are unmodified. rdar://12558838 PR14221 llvm-svn: 167064
* X86 MMX: optimize transfer from mmx to i32Manman Ren2012-10-303-2/+20
| | | | | | | | | We used to generate a store (movq) + a load. Now we use movd. rdar://9946746 llvm-svn: 167056
* Enable ELF machine type to be specified explicitly in X86 backendMichael Liao2012-10-303-15/+19
| | | | llvm-svn: 167027
* Re-commit r166971. I reverted it to quickly, when buildbots didn't have a chanceJakub Staszak2012-10-301-4/+4
| | | | | | to test it with chapni's fix (-mattr=+avx). llvm-svn: 166985
* Revert r166971. It causes buildbot failure. To be investigated.Jakub Staszak2012-10-291-4/+4
| | | | llvm-svn: 166979
* Remove unused variable.Jakub Staszak2012-10-291-1/+0
| | | | llvm-svn: 166973
* Simplify code. No functionality change.Jakub Staszak2012-10-291-4/+5
| | | | llvm-svn: 166972
* Allow to fold vector load if there is more than one bitcast, so in the case:Jakub Staszak2012-10-291-4/+4
| | | | | | | | | | | | | | | | | | | %0 = load <8 x i16>* %dest %1 = shufflevector <8 x i16> %0, <8 x i16> %in, <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 13, i32 undef, i32 14, i32 14> store <8 x i16> %1, <8 x i16>* %dest We get: vmovlpd (%eax), %xmm0, %xmm0 instead of: vmovaps (%eax), %xmm1 vmovsd %xmm1, %xmm0, %xmm0 No extra test-case is added. I just fixed the existing one (also it uses FileCheck now). llvm-svn: 166971
* [ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] isChad Rosier2012-10-291-10/+37
| | | | | | | equivalent to [expr1 + expr2]. See test cases for more examples. rdar://12470392 llvm-svn: 166949
* Fix PR14204Michael Liao2012-10-291-0/+15
| | | | | | - Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled. llvm-svn: 166947
* Fix typoJoerg Sonnenberger2012-10-291-2/+2
| | | | llvm-svn: 166945
* Silence a GCC warning about comparing signed and unsigned types.Duncan Sands2012-10-291-2/+2
| | | | llvm-svn: 166922
* Remove TargetELFWriterInfo.Rafael Espindola2012-10-285-213/+0
| | | | | | All the credit goes to Jan Voung for noticing it was dead! llvm-svn: 166902
* [ms-inline asm] Add a comment.Chad Rosier2012-10-261-0/+1
| | | | llvm-svn: 166819
* [ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.Chad Rosier2012-10-261-5/+11
| | | | | | Part of rdar://12576868 llvm-svn: 166792
* [ms-inline asm] Add support for the TYPE operator.Chad Rosier2012-10-261-1/+52
| | | | | | Part of rdar://12576868 llvm-svn: 166790
OpenPOWER on IntegriCloud