summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [X86][SSE] Generalise target shuffle combine of shuffles using variable masksSimon Pilgrim2016-07-111-13/+21
| | | | | | At present the only shuffle with a variable mask we recognise is PSHUFB, which influences if its worth the cost of mask creation/loading of a combined target shuffle with a variable mask. This change sets up the infrastructure to support other shuffles in the future but has no effect yet. llvm-svn: 275059
* Provide support for preserving assembly commentsNirav Dave2016-07-116-3/+72
| | | | | | | | | | | | | | | | | Preserve assembly comments from input in output assembly and flags to toggle property. This is on by default for inline assembly and off in llvm-mc. Parsed comments are emitted immediately before an EOL which generally places them on the expected line. Reviewers: rtrieu, dwmw2, rnk, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20020 llvm-svn: 275058
* [AMDGPU][llvm-mc] Quickfix for r272748 to enable labels in branch instructions.Artem Tamazov2016-07-111-0/+2
| | | | | | | | | | Fixes issue mentioned at: https://github.com/RadeonOpenCompute/LLVM-AMDGPU-Assembler-Extra/issues/13. Lit tests added. Differential Revision: http://reviews.llvm.org/D22133 llvm-svn: 275054
* [mips][microMIPS] Implement LDC1, SDC1, LDC2, SDC2, LWC1, SWC1, LWC2 and ↵Zlatko Buljan2016-07-1115-58/+324
| | | | | | | | SWC2 instructions and add CodeGen support Differential Revision: http://reviews.llvm.org/D18824 llvm-svn: 275050
* AVX-512: DAG lowering for scalar MIN/MAX commutable opsElena Demikhovsky2016-07-111-3/+36
| | | | | | | | DAG lowering was missing for the scalar FMINC, FMAXC nodes. The nodes are generated only in the "unsafe-fp-math" mode. Added tests. llvm-svn: 275048
* [AVX512] Add support for 512-bit ANDN now that all ones build vectors ↵Craig Topper2016-07-111-1/+2
| | | | | | survive long enough to allow the matching. llvm-svn: 275046
* [AVX512] Use vpternlog with an immediate of 0xff to create 512-bit all one ↵Craig Topper2016-07-113-5/+19
| | | | | | vectors. llvm-svn: 275045
* [X86] Add the AVX512 SET0 pseudos to foldMemoryOperandImpl since they are ↵Craig Topper2016-07-112-3/+14
| | | | | | | | marked for CanFoldAsLoad. I don't really know how to test this. llvm-svn: 275044
* Revert r275027 - Let FuncAttrs infer the 'returned' argument attributeHal Finkel2016-07-111-50/+0
| | | | | | Reverting r275027 and r275033. These seem to cause miscompiles on the AArch64 buildbot. llvm-svn: 275042
* Pointer-comparison folding should look through returned-argument functionsHal Finkel2016-07-111-0/+5
| | | | | | | | | For functions which are known to return a specific argument, pointer-comparison folding can look through the function calls as part of its analysis. Differential Revision: http://reviews.llvm.org/D9387 llvm-svn: 275039
* Teach isDereferenceablePointer to look through returned-argument functionsHal Finkel2016-07-111-0/+5
| | | | | | | | | For functions which are known to return their argument, isDereferenceableAndAlignedPointer can examine the argument value. Differential Revision: http://reviews.llvm.org/D9384 llvm-svn: 275038
* Teach SCEV to look through returned-argument functionsHal Finkel2016-07-111-0/+7
| | | | | | | | | When building SCEVs, if a function is known to return its argument, then we can build the SCEV using the corresponding argument value. Differential Revision: http://reviews.llvm.org/D9381 llvm-svn: 275037
* Teach computeKnownBits to look through returned-argument functionsHal Finkel2016-07-111-3/+8
| | | | | | | | | If a function is known to return one of its arguments, we can use that in order to compute known bits of the return value. Differential Revision: http://reviews.llvm.org/D9397 llvm-svn: 275036
* BasicAA should look through functions with returned argumentsHal Finkel2016-07-113-2/+32
| | | | | | | | | | | Motivated by the work on the llvm.noalias intrinsic, teach BasicAA to look through returned-argument functions when answering queries. This is essential so that we don't loose all other AA information when supplementing with llvm.noalias. Differential Revision: http://reviews.llvm.org/D9383 llvm-svn: 275035
* Don't use a SmallSet for returned attribute inferenceHal Finkel2016-07-111-11/+19
| | | | | | | Suggested post-commit by David Majnemer on IRC (following-up on a pre-commit review comment). llvm-svn: 275033
* Add getReturnedArgOperand to Call/InvokeInst, CallSiteHal Finkel2016-07-102-2/+31
| | | | | | | | | | | | | | | In order to make the optimizer smarter about using the 'returned' argument attribute (generally, but motivated by my llvm.noalias intrinsic work), add a utility function to Call/InvokeInst, and CallSite, to make it easy to get the returned call argument (when one exists). P.S. There is already an unfortunate amount of code duplication between CallInst and InvokeInst, and this adds to it. We should probably clean that up separately. Differential Revision: http://reviews.llvm.org/D22204 llvm-svn: 275031
* [X86][SSE] Relax type assertions for matchVectorShuffleAsInsertPSSimon Pilgrim2016-07-101-2/+4
| | | | | | Calls to matchVectorShuffleAsInsertPS only need to ensure the inputs are 128-bit vectors. Only lowerVectorShuffleAsInsertPS needs to ensure that they are v4f32. llvm-svn: 275028
* Let FuncAttrs infer the 'returned' argument attributeHal Finkel2016-07-101-0/+42
| | | | | | | | | | A function can have one argument with the 'returned' attribute, indicating that the associated argument is always the return value of the function. Add FuncAttrs inference logic. Differential Revision: http://reviews.llvm.org/D22202 llvm-svn: 275027
* [DAG] make isConstantSplatVector() available to the rest of loweringSanjay Patel2016-07-102-32/+25
| | | | llvm-svn: 275025
* AMDGPU/R600: Add implicitarg.ptr intrinsicJan Vesely2016-07-103-6/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D21622 llvm-svn: 275024
* [X86][SSE] Add support for target shuffle combining to PSHUFLW/PSHUFHWSimon Pilgrim2016-07-101-3/+48
| | | | llvm-svn: 275022
* fix documentation comments; NFCSanjay Patel2016-07-101-11/+3
| | | | llvm-svn: 275021
* [Support] Make helper function static. NFC.Benjamin Kramer2016-07-101-2/+2
| | | | llvm-svn: 275017
* [SystemZ] Utilize Test Data Class instructions.Marcin Koscielnicki2016-07-106-4/+432
| | | | | | | | | | | This adds a new SystemZ-specific intrinsic, llvm.s390.tdc.f(32|64|128), which maps straight to the test data class instructions. A new IR pass is added to recognize instructions that can be converted to TDC and perform the necessary replacements. Differential Revision: http://reviews.llvm.org/D21949 llvm-svn: 275016
* reformat, fix comments/names; NFCISanjay Patel2016-07-101-27/+22
| | | | llvm-svn: 275015
* Give helper classes/functions internal linkage. NFC.Benjamin Kramer2016-07-107-12/+25
| | | | llvm-svn: 275014
* [AVX512] Add support for lowering to 512-bit SHUFPS.Craig Topper2016-07-101-4/+8
| | | | llvm-svn: 275011
* [pdb] Sanity check the stream mapDavid Majnemer2016-07-101-1/+7
| | | | | | | | Some abstractions in LLVM "know" that they are reading in-bounds, FixedStreamArray, and provide a simple result. This breaks down if the stream map is bogus. llvm-svn: 275010
* [llvm-pdbdump] Propagate errors a little more consistentlyDavid Majnemer2016-07-102-9/+18
| | | | | | | PDBFile::getBlockData didn't really return any indication that it failed. It merely returned an empty buffer. llvm-svn: 275009
* [SCCP] Rename undefined -> unknown.Davide Italiano2016-07-101-40/+40
| | | | | | | | | | In the solver, isUndefined() does really mean "we don't know the value yet" rather than "this is an UndefinedValue". Discussed with Eli Friedman. Differential Revision: http://reviews.llvm.org/D22192 llvm-svn: 275004
* [PM] Port LoopVectorize to the new PM.Sean Silva2016-07-093-338/+373
| | | | llvm-svn: 275000
* [SCCP] Remove wrong and misleading vector handling code.Davide Italiano2016-07-091-53/+0
| | | | | | | | | This code was already commented out and it made some weird assumptions, e.g. using isUndefined() as "this value is UndefValue" instead of "we haven't computed this value is yet". Thanks to Eli Friedman for pointing out where I was wrong (and where this code was wrong). llvm-svn: 274995
* [X86][SSE] Add support for target shuffle combining to INSERTPSSimon Pilgrim2016-07-091-10/+48
| | | | llvm-svn: 274990
* [X86][SSE] Use scaleShuffleMask helper. NFCI.Simon Pilgrim2016-07-091-11/+2
| | | | llvm-svn: 274988
* [COFF, Dwarf] Don't emit DW_AT_location for dllimported entitiesDavid Majnemer2016-07-092-55/+66
| | | | | | | There exists no relocation which can describe the address of a dllimported variable: do not try to describe their location. llvm-svn: 274986
* [SLSR] Fix crash on handling 128-bit integers.Jingyue Wu2016-07-091-7/+20
| | | | | | | | | ConstantInt::getSExtValue may fail on >64-bit integers. Add checks to call getSExtValue only on narrow integers. As a minor aside, simplify slsr-gep.ll to remove unnecessary load instructions. llvm-svn: 274982
* fix documentation comments; NFCSanjay Patel2016-07-093-159/+143
| | | | llvm-svn: 274981
* [lanai] Treat .t as optional in assembly parser for RR operands and add ↵Jacques Pienaar2016-07-092-9/+38
| | | | | | predicate operand to ShiftRR llvm-svn: 274980
* AMDGPU: Move R600 only pieces into R600 classesMatt Arsenault2016-07-0911-109/+81
| | | | llvm-svn: 274979
* Revert "AMDGPU: Remove unused control flow intrinsic"Matt Arsenault2016-07-097-0/+32
| | | | llvm-svn: 274978
* [ArgPromote] Use function_ref and for-range loops.Benjamin Kramer2016-07-091-13/+10
| | | | | | No functionality change intended. llvm-svn: 274973
* AMDGPU: Prune AMDGPUAsmParser in libdeps.NAKAMURA Takumi2016-07-091-1/+1
| | | | llvm-svn: 274970
* AMDGPU: Fix fdiv lowering when f32 denormals supportedMatt Arsenault2016-07-091-5/+3
| | | | | | Also fix test not actually using function labels. llvm-svn: 274969
* [X86] Remove and autoupgrade 512-bit non-temporal store intrinsics.Craig Topper2016-07-093-27/+7
| | | | llvm-svn: 274966
* [LoopSimplify] Remove a comment which is unlikely to age well.Davide Italiano2016-07-091-4/+0
| | | | | | | Chandler pointed out in his review but I forgot to remove before committing, my bad. llvm-svn: 274963
* [PM] Port CrossDSOCFI to the new pass manager.Davide Italiano2016-07-093-1/+12
| | | | llvm-svn: 274962
* [CFLAA] Make a constant variable `const`. NFC.George Burgess IV2016-07-091-1/+1
| | | | | | | `const` was dropped by r274958, and the lack of `const` makes GCC6 (correctly) complain. llvm-svn: 274961
* [PM] Fix a think-o. mv {Scalar,Vectorize}/SLPVectorize.hSean Silva2016-07-092-2/+2
| | | | llvm-svn: 274960
* [PM] Port LoopSimplify to the new pass manager.Davide Italiano2016-07-094-0/+34
| | | | | | | | | While here move simplifyLoop() function to the new header, as suggested by Chandler in the review. Differential Revision: http://reviews.llvm.org/D21404 llvm-svn: 274959
* [CFLAA] Move the graph builder out from CFLSteens. NFC.George Burgess IV2016-07-093-422/+440
| | | | | | | | Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D22022 llvm-svn: 274958
OpenPOWER on IntegriCloud