summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* [SCCP] Make the test added in r289175 more meaningful.Davide Italiano2016-12-091-1/+2
| | | | | | Add a comment while here. llvm-svn: 289182
* [SCCP] Teach the pass about `mul %x 0` even if %x is overdefined.Davide Italiano2016-12-091-1/+8
| | | | | | | | | | | | | | | | | | | | | | | The motivating example is: extern int patatino; int goo() { int x = 0; for (int i = 0; i < 1000000; ++i) { x *= patatino; } return x; } Currently SCCP will not realize that this function returns always zero, therefore will try to unroll and vectorize the loop at -O3 producing an awful lot of (useless) code. With this change, it will just produce: 0000000000000000 <g>: xor %eax,%eax retq llvm-svn: 289175
* [AVX-512] Add vpermilps/pd to load folding tables.Craig Topper2016-12-092-0/+200
| | | | llvm-svn: 289173
* [AVX-512] Move some floating point stack folding test cases out of the ↵Craig Topper2016-12-094-192/+192
| | | | | | integer test. llvm-svn: 289172
* WholeProgramDevirt: Teach the pass to handle structs of arrays.Peter Collingbourne2016-12-093-4/+74
| | | | | | This will become necessary in some cases once D22296 lands. llvm-svn: 289165
* Make WholeProgramDevirt understand ConstStruct vtables.Peter Collingbourne2016-12-092-0/+63
| | | | | | | | Based on a patch by LemonBoy! Differential Revision: https://reviews.llvm.org/D26581 llvm-svn: 289162
* [ObjectYAML] Support for DWARF debug_arangesChris Bieneman2016-12-091-0/+335
| | | | | | This patch adds support for round tripping DWARF debug_aranges in and out of YAML. llvm-svn: 289161
* [InstCombine] add tests for umin+icmp; NFCSanjay Patel2016-12-081-0/+258
| | | | llvm-svn: 289157
* [InstCombine] add tests for umax+icmp; NFCSanjay Patel2016-12-081-0/+258
| | | | llvm-svn: 289156
* [InstSimplify] Add "X / 1.0" to SimplifyFDivInst.Zia Ansari2016-12-081-3/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D27587 llvm-svn: 289153
* [InstCombine] add tests for smax+icmp; NFCSanjay Patel2016-12-081-0/+258
| | | | llvm-svn: 289151
* GlobalISel: fall back gracefully for debug intrinsics.Tim Northover2016-12-081-0/+33
| | | | | | | Supporting them properly is a reasonably complex chunk of work, so to allow bot testing before then we should at least be able to fall back to DAG ISel. llvm-svn: 289150
* [SCCP] Make sure SCCP and ConstantFolding agree on undef >> a.Davide Italiano2016-12-081-2/+2
| | | | | | | Currently SCCP folds the value to -1, while ConstantProp folds to 0. This changes SCCP to do what ConstantFolding does. llvm-svn: 289147
* [mips] Make the test case more specific and provide OS component of a ↵Simon Atanasyan2016-12-081-3/+3
| | | | | | triple. NFC llvm-svn: 289117
* [mips] Change instruction s/daddiu/addiu/ since O32 prohibits the use of ↵Simon Atanasyan2016-12-081-34/+34
| | | | | | 64-bit GPRs. NFC llvm-svn: 289115
* [mips] Change gnueabi to gnu in the triple because EABI has been removed ↵Simon Atanasyan2016-12-081-1/+1
| | | | | | recently. NFC llvm-svn: 289114
* [mips] Remove N32 Android test because Android does not support N32 ABI. NFCSimon Atanasyan2016-12-081-2/+0
| | | | llvm-svn: 289113
* Don't emit .seh_handler directives for any cleanup funcletsReid Kleckner2016-12-081-1/+1
| | | | | | | | | | | | | | | | We were falsely claiming that we had an LSDA for the relevant EH personality before this change, which could lead to the EH machinery interpreting random adjacent data as an LSDA. Fixes PR31317 This change is safe because cleanups can't contain exception handlers today. We do these things to maintain that invariant: - C++ destructors are naturally out-of-line - __finally blocks are outlined in clang - LLVM's inliner will not inline EH constructs into cleanups llvm-svn: 289101
* [InstSimplify] add fdiv x/1.0 test and update checks; NFCSanjay Patel2016-12-081-8/+25
| | | | llvm-svn: 289098
* AMDGPU: Make f16 ConstantFP legalMatt Arsenault2016-12-081-2/+3
| | | | | | | | | | | | | | Not having this legal led to combine failures, resulting in dumb things like bitcasts of constants not being folded away. The only reason I'm leaving the v_mov_b32 hack that f32 already uses is to avoid madak formation test regressions. PeepholeOptimizer has an ordering issue where the immediate fold attempt is into the sgpr->vgpr copy instead of the actual use. Running it twice avoids that problem. llvm-svn: 289096
* AMDGPU: Fix commuting v_sub_u16Matt Arsenault2016-12-081-0/+169
| | | | | | | | The correct commutable opcode was set to itself, so this was simply swapping the operands to commute instead of also changing the opcode to v_subrev_u16. llvm-svn: 289093
* [AMDGPU] Add amdgpu-unify-metadata passStanislav Mekhanoshin2016-12-081-0/+26
| | | | | | | | | | | | | | | | | | Multiple metadata values for records such as opencl.ocl.version, llvm.ident and similar are created after linking several modules. For some of them, notably opencl.ocl.version, this creates semantic problem because we cannot tell which version of OpenCL the composite module conforms. Moreover, such repetitions of identical values often create a huge list of unneeded metadata, which grows bitcode size both in memory and stored on disk. It can go up to several Mb when linked against our OpenCL library. Lastly, such long lists obscure reading of dumped IR. The pass unifies metadata after linking. Differential Revision: https://reviews.llvm.org/D25381 llvm-svn: 289092
* IR, X86: Understand !absolute_symbol metadata on global variables.Peter Collingbourne2016-12-085-0/+177
| | | | | | | | | | | | | | | | | Summary: Attaching !absolute_symbol to a global variable does two things: 1) Marks it as an absolute symbol reference. 2) Specifies the value range of that symbol's address. Teach the X86 backend to allow absolute symbols to appear in place of immediates by extending the relocImm and mov64imm32 matchers. Start using relocImm in more places where it is legal. As previously proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/105800.html Differential Revision: https://reviews.llvm.org/D25878 llvm-svn: 289087
* [AMDGPU] Scalarization of global uniform loads.Alexander Timofeev2016-12-082-0/+206
| | | | | | | | | | | | | | | | | | Summary: LC can currently select scalar load for uniform memory access basing on readonly memory address space only. This restriction originated from the fact that in HW prior to VI vector and scalar caches are not coherent. With MemoryDependenceAnalysis we can check that the memory location corresponding to the memory operand of the LOAD is not clobbered along the all paths from the function entry. Reviewers: rampitec, tstellarAMD, arsenm Subscribers: wdng, arsenm, nhaehnle Differential Revision: https://reviews.llvm.org/D26917 llvm-svn: 289076
* ConstantFolding: Don't crash when encountering vector GEPKeno Fischer2016-12-081-0/+19
| | | | | | | | | | | | | | ConstantFolding tried to cast one of the scalar indices to a vector type. Instead, use the vector type only for the first index (which is the only one allowed to be a vector) and use its scalar type otherwise. Fixes PR31250. Reviewers: majnemer Differential Revision: https://reviews.llvm.org/D27389 llvm-svn: 289073
* X86: Add checks for fma_patterns[_wide].ll with -enable-no-infs-fp-mathNicolai Haehnle2016-12-082-701/+1244
| | | | | | | | | | | | This re-adds checks for the patterns that were disabled with r288506. Reviewers: spatel, delena, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27346 llvm-svn: 289049
* AMDGPU: Properly implement SIRegisterInfo::isFrameOffsetLegal and ↵Nicolai Haehnle2016-12-087-98/+122
| | | | | | | | | | | | | | | | | | | | | | | | | needsFrameBaseReg Summary: Without the fix to isFrameOffsetLegal to consider the instruction's immediate offset, the new test case hits the corresponding assertion in resolveFrameIndex, because the LocalStackSlotAllocation pass re-uses a different base register. With only the fix to isFrameOffsetLegal, code quality reduces in a bunch of places because frame base registers are added where they're not needed. This is addressed by properly implementing needsFrameBaseReg, which also helps to avoid unnecessary zero frame indices in a bunch of other places. Fixes piglit glsl-1.50/execution/variable-indexing/gs-output-array-vec4-index-wr.shader_test Reviewers: arsenm, tstellarAMD Subscribers: qcolombet, kzhuravl, wdng, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D27344 llvm-svn: 289048
* [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.Alexey Bataev2016-12-082-774/+366
| | | | | | | | | | | | | | | When trying to vectorize trees that start at insertelement instructions function tryToVectorizeList() uses vectorization factor calculated as MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree cost for this fixed vectorization factor is too high. Patch tries to improve the situation. It tries different vectorization factors from max(PowerOf2Floor(NumberOfVectorizedValues), MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries to choose the best one. Differential Revision: https://reviews.llvm.org/D27215 llvm-svn: 289043
* [AVR] Add MIR tests for pseudo instruction expansionsDylan McKay2016-12-0813-0/+308
| | | | | | This adds tests for 13 pseudo instruction expansions. llvm-svn: 289039
* [X86][SSE] Add vector test for (shl (or x, c1), c2) -> (or (shl x, c2), c1 ↵Simon Pilgrim2016-12-081-0/+36
| | | | | | << c2) detailed in D19325 llvm-svn: 289035
* [AVR] Add MIR tests for a few pseudo instructionsDylan McKay2016-12-083-0/+72
| | | | llvm-svn: 289031
* LTO: Hash the parts of the LTO configuration that affect code generation.Peter Collingbourne2016-12-081-0/+27
| | | | | | | | | Most importantly, we need to hash the relocation model, otherwise we can end up trying to link non-PIC object files into PIEs or DSOs. Differential Revision: https://reviews.llvm.org/D27556 llvm-svn: 289024
* Revert "[CodeGen] Fix invalid DWARF info on Win64"Keno Fischer2016-12-081-31/+17
| | | | | | Appears to break on build bots. Reverting pending investigation. llvm-svn: 289014
* [CodeGen] Fix invalid DWARF info on Win64Keno Fischer2016-12-081-17/+31
| | | | | | | | | | | | | | | The relocations for `DIEEntry::EmitValue` were wrong for Win64 (emitting FK_Data_4 instead of FK_SecRel_4). This corrects that oversight so that the DWARF data is correct in Win64 COFF files. Fixes PR15393. Patch by Jameson Nash <jameson@juliacomputing.com> based on a patch by David Majnemer. Differential Revision: https://reviews.llvm.org/D21731 llvm-svn: 289013
* CFI-icall on ThumbEvgeniy Stepanov2016-12-081-16/+28
| | | | | | | | | | | | Replace @progbits in the section directive with %progbits, because "@" starts a comment on arm/thumb. Use b.w branch instruction. Use .thumb_function and .thumb_set for proper arm/thumb interwork. This way jumptable entry addresses on thumb have bit 0 set (correctly). This does not affect CFI check math, because the address of the jumptable start also has that bit set. This does not work on thumbv5, because it does not support b.w, and the linker would not insert a veneer (trampoline?) to extend the range of b.n. We may need to do full-range plt-style jumptables on thumbv54, which are 12 bytes per entry. Another option is "push lr; bl; pop pc" (4 bytes) but that needs unwinding instructions, etc. Differential Revision: https://reviews.llvm.org/D27499 llvm-svn: 289008
* The few days mentioned in r267095 are overMatthias Braun2016-12-081-1/+0
| | | | llvm-svn: 289004
* [InlineSpiller] Don't call TargetInstrInfo::foldMemoryOperand with an empty ↵Quentin Colombet2016-12-081-0/+22
| | | | | | | | list. Since r287792 if we try to do that we will hit an assert. llvm-svn: 289001
* [asan] Split load and store checks in test. NFCIFilipe Cabecinhas2016-12-071-62/+62
| | | | llvm-svn: 288991
* [BDCE] Skip metadata while replacing uses.Davide Italiano2016-12-071-0/+47
| | | | | | | | | | | | The fix committed in r288851 doesn't cover all the cases. In particular, if we have an instruction with side effects which has a no non-dbg use not depending on the bits, we still perform RAUW destroying the dbg.value's first argument. Prevent metadata from being replaced here to avoid the issue. Differential Revision: https://reviews.llvm.org/D27534 llvm-svn: 288987
* GlobalISel: use correct builder for ConstantExprs.Tim Northover2016-12-071-2/+1
| | | | | | | | ConstantExpr instances were emitting code into the current block rather than the entry block. This meant they didn't necessarily dominate all uses, which is clearly wrong. llvm-svn: 288985
* [ObjectYAML] Rename DWARF entries to match section namesChris Bieneman2016-12-072-4/+4
| | | | | | This change makes the yaml tags for the members of the DWARF data match the names of the DWARF sections. llvm-svn: 288981
* GlobalISel: simplify MachineIRBuilder interface.Tim Northover2016-12-075-22/+57
| | | | | | | | | | | | MachineIRBuilder had weird before/after and beginning/end flags for the insert point. Unfortunately the non-default means that instructions will be inserted in reverse order which is almost never what anyone wants. Really, I think we just want (like IRBuilder has) the ability to insert at any C++ iterator-style point (i.e. before any instruction or before MBB.end()). So this fixes MIRBuilders to behave like IRBuilders in this respect. llvm-svn: 288980
* InstCombine: Fold bitcast of vector to FP scalarMatt Arsenault2016-12-071-0/+64
| | | | llvm-svn: 288978
* [GVNHoist] Invalidate MemDep when an instruction is moved.Eli Friedman2016-12-071-0/+33
| | | | | | | | | | See also r279907. Fixes https://llvm.org/bugs/show_bug.cgi?id=30991 . Differential Revision: https://reviews.llvm.org/D27493 llvm-svn: 288968
* [X86] Skip over DEBUG_VALUE while looking for start of call sequenceMichael Kuperstein2016-12-071-0/+55
| | | | | | | | | | | If we don't skip over DEBUG_VALUEs, we get differences between -g and non-g code. This fixes PR31242. Differential Revision: https://reviews.llvm.org/D27485 llvm-svn: 288965
* [X86] Do not assume "ri" instructions always have an immediate operandMichael Kuperstein2016-12-071-0/+20
| | | | | | | | | | | The second operand of an "ri" instruction may be an immediate, but it may also be a globalvariable, so we should make any assumptions. This fixes PR31271. Differential Revision: https://reviews.llvm.org/D27481 llvm-svn: 288964
* [InstCombine] add tests for smin+icmp; NFCSanjay Patel2016-12-071-0/+357
| | | | | | | | The tests that already work are folded in InstSimplify, so those tests should be redundant and we can remove them if they don't seem worthwhile for completeness. llvm-svn: 288957
* [ObjectYAML] Support for DWARF __debug_abbrev sectionChris Bieneman2016-12-071-0/+433
| | | | | | This patch adds support for round-tripping DWARF debug abbreviations through the obj<->yaml tools. llvm-svn: 288955
* [SelectionDAG] Add knownbits support for vector demandedelts in ↵Simon Pilgrim2016-12-071-10/+2
| | | | | | SMAX/SMIN/UMAX/UMIN opcodes llvm-svn: 288926
* [X86] Add knownbits vector UMAX testSimon Pilgrim2016-12-071-0/+31
| | | | | | In preparation for demandedelts support llvm-svn: 288920
OpenPOWER on IntegriCloud