summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* InstSimplify: Handle some simple tautological comparisonsDavid Majnemer2014-11-252-0/+98
| | | | | | | | This handles cases where we are comparing a masked value against itself. The analysis could be further improved by making it recursive but such expense is not currently justified. llvm-svn: 222716
* Revert "unique_ptrify LLVMContextImpl::CAZConstants"David Blaikie2014-11-253-9/+6
| | | | | | | | Missed the complexities of how these elements are destroyed. This reverts commit r222714. llvm-svn: 222715
* unique_ptrify LLVMContextImpl::CAZConstantsDavid Blaikie2014-11-253-6/+9
| | | | llvm-svn: 222714
* [PowerPC] Add the 'attn' instructionHal Finkel2014-11-254-0/+18
| | | | | | | | The attn instruction is not part of the Power ISA, but is documented in the A2 user manual, and is accepted by the GNU assembler for the A2 and the POWER4+. Reported as part of PR21650. llvm-svn: 222712
* [PowerPC] Implement combineRepeatedFPDivisorsHal Finkel2014-11-243-0/+62
| | | | | | | | This does not matter on newer cores (where we can use reciprocal estimates in fast-math mode anyway), but for older cores this allows us to generate better fast-math code where we have multiple FDIVs with a common divisor. llvm-svn: 222710
* Factor check for the assume intrinsic out of checks in ↵Philip Reames2014-11-241-42/+39
| | | | | | | | | | | | | | computeKnownBitsFromAssume We were matching against the assume intrinsic in every check. Since we know that it must be an assume, this is just wasted work. Somewhat surprisingly, matching an intrinsic id is actually relatively expensive. It devolves to a string construction and comparison in Function::isIntrinsic. I originally spotted this because it showed up in a performance profile of my compiler. I've since discovered a separate issue which seems to be the actual root cause, but this is minor perf goodness regardless. I'm likely to follow up with another change to factor out the comparison matching. There's no need to match the compare instruction in every single one of the tests. Differential Revision: http://reviews.llvm.org/D6312 llvm-svn: 222709
* Incorporate review comments from r221742Philip Reames2014-11-241-2/+11
| | | | | | This change implements the comment and style changes Sean requested during post commit review with r221742. Sorry for the delay. llvm-svn: 222707
* Bug 21610: Canonicalize min/max fcmp selects to use ordered comparisonsMatt Arsenault2014-11-243-9/+163
| | | | llvm-svn: 222705
* Convert test to FileCheck and use CHECK-LABELMatt Arsenault2014-11-242-1/+11
| | | | llvm-svn: 222704
* Clarify wording in the LangRef around !invariant.loadPhilip Reames2014-11-241-4/+5
| | | | | | | | | | | | | | | Clarify the wording around !invariant.load to properly reflect the semantics of such loads with respect to control dependence and location lifetime. To the best of my knowledge, the revised wording respects the actual implementation and understanding of issues involved highlighted in the recent 'Optimization hints for "constant" loads' thread on LLVMDev. In particular, I'm aiming for the following results: - To clarify that an invariant.load can fault and must respect control dependence. In particular, it is not sound to unconditionally pull an invariant load out of a loop if that loop would potentially never execute. - To clarify that the invariant nature of a given pointer does not preclude the modification of that location through a pointer which is unrelated to the load operand. In particular, initializing a location and then passing a pointer through an opaque intrinsic which produces a new unrelated pointer, should behave as expected provided that the intrinsic is memory dependent on the initializing store. - To clarify that storing a value to an invariant location is defined. It can not, for example, be considered unreachable. The value stored can be assumed to be equal to the value of any previous (or following!) invariant load, but the store itself is defined. I recommend that anyone interested in using !invariant.load, or optimizing for them, read over the discussion in the review thread. A number of motivating examples are discussed. Differential Revision: http://reviews.llvm.org/D6346 llvm-svn: 222700
* Add a disable-output option to the gold plugin.Rafael Espindola2014-11-242-9/+26
| | | | | | This corresponds to the opt option and is handy for profiling. llvm-svn: 222687
* Remove the unused FindUsedTypes pass.Rafael Espindola2014-11-246-170/+0
| | | | | | It was dead since r134829. llvm-svn: 222684
* Add and use Type::subtypes. NFC.Rafael Espindola2014-11-243-6/+7
| | | | llvm-svn: 222682
* Pass the .ll files to llvm-link directly. NFC.Rafael Espindola2014-11-243-8/+2
| | | | llvm-svn: 222681
* Correct path to regression tests in ExtendingLLVMSergey Dmitrouk2014-11-241-4/+4
| | | | llvm-svn: 222678
* [AArch64] Fix clobber computation in A57LoadBalancing pass.Chad Rosier2014-11-241-1/+7
| | | | | | | Extremely difficult to reproduce, so no test case included. PR21637 llvm-svn: 222677
* Removing unused variable.Colin LeMahieu2014-11-241-1/+0
| | | | llvm-svn: 222676
* [asan/coverage] change the way asan coverage instrumentation is done: ↵Kostya Serebryany2014-11-244-16/+13
| | | | | | instead of setting the guard to 1 in the generated code, pass the pointer to guard to __sanitizer_cov and set it there. No user-visible functionality change expected llvm-svn: 222675
* [PowerPC] Fix PR 21652 - copy st_other bits on symbol assignmentUlrich Weigand2014-11-242-0/+36
| | | | | | | | | | | When processing an assignment in the integrated assembler that sets a symbol to the value of another symbol, we need to copy the st_other bits that encode the local entry point offset. Modeled after MipsTargetELFStreamer::emitAssignment handling of the ELF::STO_MIPS_MICROMIPS flag. llvm-svn: 222672
* More long path name support on Windows, this time in program execution.Paul Robinson2014-11-244-9/+74
| | | | | | | Allows long paths for the executable and redirected stdin/stdout/stderr. Addresses PR21563. llvm-svn: 222671
* [Hexagon] Adding asrh instruction, removing unused multiclasses.Colin LeMahieu2014-11-243-40/+17
| | | | llvm-svn: 222670
* [Hexagon] Adding aslh instruction.Colin LeMahieu2014-11-243-5/+17
| | | | llvm-svn: 222668
* [Hexagon] Adding zxth instruction.Colin LeMahieu2014-11-243-5/+17
| | | | llvm-svn: 222662
* Adding const iterator to MCInst. http://reviews.llvm.org/D6359Colin LeMahieu2014-11-241-1/+4
| | | | llvm-svn: 222661
* [Hexagon] Adding zxtb instruction.Colin LeMahieu2014-11-243-5/+53
| | | | llvm-svn: 222660
* InstCombine: Don't create an unused instructionDavid Majnemer2014-11-242-2/+11
| | | | | | | | | | We would create an instruction but not inserting it. Not inserting the unused instruction would lead us to verification failure. This fixes PR21653. llvm-svn: 222659
* [mips][microMIPS] Fix JRADDIUSP instructionJozef Kolek2014-11-242-5/+2
| | | | | | | | | Fix JRADDIUSP instruction, remove delay slot flag because this instruction doesn't have delay slot. Differential Revision: http://reviews.llvm.org/D6365 llvm-svn: 222658
* Added comment about llvm_execute_on_thread waiting for thread to complete.Yaron Keren2014-11-241-1/+2
| | | | llvm-svn: 222654
* [mips][microMIPS] Implement LBU16, LHU16, LW16, SB16, SH16 and SW16 instructionsJozef Kolek2014-11-247-0/+209
| | | | | | Differential Revision: http://reviews.llvm.org/D5122 llvm-svn: 222653
* [mips][microMIPS] Implement 16-bit instructions registers including ZERO ↵Jozef Kolek2014-11-243-0/+41
| | | | | | | | | | instead of S0 Implement microMIPS 16-bit instructions register set: $0, $2-$7 and $17. Differential Revision: http://reviews.llvm.org/D5780 llvm-svn: 222652
* [Mips] Update MIPS relocations listSimon Atanasyan2014-11-241-0/+28
| | | | | | No functional changes. llvm-svn: 222651
* Replace a comment that says 'unreachable' with llvm_unreachable in TableGen ↵Craig Topper2014-11-241-1/+1
| | | | | | AsmWriter output. llvm-svn: 222650
* Removing a variable that is initialized but never read. The original author ↵Aaron Ballman2014-11-241-6/+2
| | | | | | has been alerted to the warning, in case this variable is meant to be used. Fixes -Werror builds in the meantime. llvm-svn: 222649
* [mips][microMIPS] Implement disassembler support for 16-bit instructionsJozef Kolek2014-11-244-14/+147
| | | | | | | | | | | With the help of new method readInstruction16() two bytes are read and decodeInstruction() is called with DecoderTableMicroMips16, if this fails four bytes are read and decodeInstruction() is called with DecoderTableMicroMips32. Differential Revision: http://reviews.llvm.org/D6149 llvm-svn: 222648
* [X86] Improved target specific combine on VSELECT dag nodes.Andrea Di Biagio2014-11-243-153/+192
| | | | | | | | | | | This patch teaches function 'transformVSELECTtoBlendVECTOR_SHUFFLE' how to convert VSELECT dag nodes to shuffles on targets that do not have SSE4.1. On pre-SSE4.1 targets, we can still perform blend operations using movss/movsd. Also, removed a target specific combine that performed a premature lowering of VSELECT nodes to target specific MOVSS/MOVSD nodes. llvm-svn: 222647
* InstCombine: Don't assume DataLayout is always availableDavid Majnemer2014-11-242-1/+22
| | | | | | | | | We tried to get the result of DataLayout::getLargestLegalIntTypeSize but we didn't have a DataLayout. This resulted in opt crashing. This fixes PR21651. llvm-svn: 222645
* Support: Add *cast_or_null<> for pointer wrappersDuncan P. N. Exon Smith2014-11-242-0/+130
| | | | | | | | | | | | | | | | | | | | Fill in omission of `cast_or_null<>` and `dyn_cast_or_null<>` for types that wrap pointers (e.g., smart pointers). Type traits need to be slightly stricter than for `cast<>` and `dyn_cast<>` to resolve ambiguities with simple types. There didn't seem to be any unit tests for pointer wrappers, so I tested `isa<>`, `cast<>`, and `dyn_cast<>` while I was in there. This only supports pointer wrappers with a conversion to `bool` to check for null. If in the future it's useful to support wrappers without such a conversion, it should be a straightforward incremental step to use the `simplify_type` machinery for the null check. In that case, the unit tests should be updated to remove the `operator bool()` from the `pointer_wrappers::PTy`. llvm-svn: 222644
* Detect best type for some static index tables instead of just using uint32_t ↵Craig Topper2014-11-241-15/+24
| | | | | | to reduce total data size. llvm-svn: 222643
* Converted back to Unix format (after my last commit 222632)Elena Demikhovsky2014-11-231-3241/+3241
| | | | llvm-svn: 222636
* [X86] Fixes bug in build_vector v4x32 loweringMichael Kuperstein2014-11-232-3/+23
| | | | | | | | | | | | | r222375 made some improvements to build_vector lowering of v4x32 and v4xf32 into an insertps, but it missed a case where: 1. A single extracted element is used twice. 2. The lower of the two non-zero indexes should be preserved, and the higher should be used for the dest mask. This caused a crash, since the source value for the insertps ends-up uninitialized. Differential Revision: http://reviews.llvm.org/D6377 llvm-svn: 222635
* Add missing override keywords.Craig Topper2014-11-231-2/+2
| | | | llvm-svn: 222634
* Tablegen output formatting fixes.Craig Topper2014-11-231-2/+4
| | | | llvm-svn: 222633
* Masked Vector Load and Store Intrinsics.Elena Demikhovsky2014-11-2332-3154/+4418
| | | | | | | | | | | | | | Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores. Added SDNodes for masked operations and lowering patterns for X86 code generator. Examples: <16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask) declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask) Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch. http://reviews.llvm.org/D6191 llvm-svn: 222632
* R600: Fix extloads of i1 on R600/EvergreenMatt Arsenault2014-11-232-13/+33
| | | | llvm-svn: 222631
* R600: Fix assert on copy of an i1 on pre-SIMatt Arsenault2014-11-231-1/+2
| | | | | | | i1 is not a legal type on Evergreen, so this combine proceeded and tried to produce a bitcast between i1 and i8. llvm-svn: 222630
* R600/SI: Add additional tests for i1 loadsMatt Arsenault2014-11-231-1/+22
| | | | llvm-svn: 222629
* R600/SI: Fix broken check lines and modernize prefixesMatt Arsenault2014-11-232-48/+50
| | | | | | Use -LABEL and remove -CHECK llvm-svn: 222628
* R600/SI: Fix missing -verify-machineinstrs on a testMatt Arsenault2014-11-231-1/+1
| | | | llvm-svn: 222627
* InstCombine: Propagate exact for (sdiv X, Pow2) -> (udiv X, Pow2)David Majnemer2014-11-222-2/+15
| | | | llvm-svn: 222625
* InstCombine: Propagate exact for (sdiv X, Y) -> (udiv X, Y)David Majnemer2014-11-222-1/+13
| | | | llvm-svn: 222624
OpenPOWER on IntegriCloud