- Jun 20, 2018
-
-
Simon Dardis authored
llvm-svn: 335178
-
Benjamin Kramer authored
This fixes an extremely subtle non-determinism that can only be triggered by an unfortunate alignment of passes. In my case: - JumpThreading does large dominator tree updates - CorrelatedValuePropagation preserves domtree now - LICM codegen depends on the order of children on domtree nodes The last part is non-deterministic if the update was stored in a set. But it turns out that the set is completely unnecessary, updates are deduplicated at an earlier stage so we can just use a vector, which is both more efficient and doesn't destroy the input ordering. I didn't manage to get the 240 MB IR file reduced enough, triggering this bug requires a lot of jump threading, so landing this without a test case. Differential Revision: https://reviews.llvm.org/D48392 llvm-svn: 335176
-
Alina Sbirlea authored
Summary: Make the MemorySSA verify also check that all Phi incoming blocks are block predecessors. Reviewers: george.burgess.iv Subscribers: sanjoy, jlebar, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D48333 llvm-svn: 335174
-
Craig Topper authored
I don't believe there is any real reason to have separate X86 specific opcodes for vector compares. Setcc has the same behavior just uses a different encoding for the condition code. I had to change the CondCodeAction for SETLT and SETLE to prevent some transforms from changing SETGT lowering. Differential Revision: https://reviews.llvm.org/D43608 llvm-svn: 335173
-
Simon Pilgrim authored
As described in D48359, this patch pushes InstructionsState down the BoUpSLP call hierarchy instead of the corresponding raw OpValue. This makes it easier to track the alternate opcode etc. and avoids us having to call getAltOpcode which makes it difficult to support more than one alternate opcode. Differential Revision: https://reviews.llvm.org/D48382 llvm-svn: 335170
-
Stanislav Mekhanoshin authored
Previously this folding was done only if select is a first operand. However, for non-commutative operations constant may go before select. Differential Revision: https://reviews.llvm.org/D48223 llvm-svn: 335167
-
Sanjay Patel authored
llvm-svn: 335165
-
Simon Dardis authored
Additionally, correct the definition of the rdhwr instruction. Reviewers: atanasyan, abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D48216 llvm-svn: 335162
-
Matt Arsenault authored
llvm-svn: 335161
-
Matt Arsenault authored
llvm-svn: 335160
-
Krzysztof Parzyszek authored
llvm-svn: 335158
-
Sanjay Patel authored
There are more existing potential users of this, but I've limited this patch to the first couple that I found to minimize typo risk. llvm-svn: 335157
-
Chandler Carruth authored
The idea of partial unswitching is to take a *part* of a branch's condition that is loop invariant and just unswitching that part. This primarily makes sense with i1 conditions of branches as opposed to switches. When dealing with i1 conditions, we can easily extract loop invariant inputs to a a branch and unswitch them to test them entirely outside the loop. As part of this, we now create much more significant cruft in the loop body, so this relies on adding cleanup passes to the loop pipeline and revisiting unswitched loops to do that cleanup before continuing to process them. This already appears to be more powerful at unswitching than the old loop unswitch pass, and so I'd appreciate pretty careful review in case I'm just missing some correctness checks. The `LIV-loop-condition` test case is not unswitched by the old unswitch pass, but is with this pass. Thanks to Sanjoy and Fedor for the review! Differential Revision: https://reviews.llvm.org/D46706 llvm-svn: 335156
-
Alex Bradbury authored
These instructions were renamed in version 2.2 of the user-level ISA spec, but the old name should also be accepted by standard tools. llvm-svn: 335154
-
Jessica Paquette authored
The outliner emits debug info. Add a test that outlines a function and uses llvm-dwarfdump to check the emitted DWARF for correctness. llvm-svn: 335153
-
Vedant Kumar authored
This utility should operate on Values, not Instructions. While I'm here, I've also made it possible to skip emitting replacement dbg.values for certain debug users (by having RewriteExpr return nullptr). llvm-svn: 335152
-
Sanjay Patel authored
These represent the most basic requested transform - a matching operand and 2 constant operands. llvm-svn: 335151
-
Florian Hahn authored
Using OrderedInstructions::dominates as comparator for instructions in BBs without dominance relation can cause a non-deterministic order between such instructions. That in turn can cause us to materialize copies in a non-deterministic order. While this does not effect correctness, it causes some minor non-determinism in the final generated code, because values have slightly different labels. Without this patch, running -print-predicateinfo on a reasonably large module produces slightly different output on each run. This patch uses the dominator trees DFSInNum to order instruction from different BBs, which should enforce a deterministic ordering and guarantee that dominated instructions come after the instructions that dominate them. Reviewers: dberlin, efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D48230 llvm-svn: 335150
-
Paul Robinson authored
llvm-svn: 335146
-
Vlad Tsyrklevich authored
Summary: Due to uniqueing of DICompositeTypes, it's possible for a type from one module to be loaded into another earlier module without being renamed. Then when the defining module is being IRMoved, the type can be used as a Mapping destination before being loaded, such that when it's requested using TypeMapTy::get() it will fail with an assertion that the type is a source type when it's actually a type in both the source and destination modules. Correctly handle that case by allowing a non-opaque non-literal struct type be present in both modules. Fix for PR37684. Reviewers: pcc, tejohnson Reviewed By: pcc, tejohnson Subscribers: tobiasvk, mehdi_amini, steven_wu, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D47898 llvm-svn: 335145
-
Vedant Kumar authored
The purpose of this utility is to make it easier for optimizations to insert replacement dbg.values for instructions they are deleting. This is useful in situations where salvageDebugInfo is inapplicable, say, because the new dbg.value cannot refer to an operand of the dying value. The utility is called insertReplacementDbgValues. It assumes that the instruction 'From' is going to be deleted, and inserts replacement dbg.values for each debug user of 'From'. The newly-inserted dbg.values refer to 'To' instead of 'From'. Each replacement dbg.value has the same location and variable as the debug user it replaces, has a DIExpression determined by the result of 'RewriteExpr' applied to an old debug user of 'From', and is placed before 'InsertBefore'. This should simplify future patches, like D48331. llvm-svn: 335144
-
Paul Robinson authored
llvm-svn: 335143
-
Simon Pilgrim authored
A future patch will have isOneOf use InstructionsState. llvm-svn: 335142
-
Bjorn Pettersson authored
Summary: Found some regressions (infinite loop in DAGTypeLegalizer::RemapId) after r334880. This patch makes sure that we do map a TableId to itself. Reviewers: niravd Reviewed By: niravd Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48364 llvm-svn: 335141
-
Nirav Dave authored
Summary: Check that and masks are strictly smaller than implicit mask from narrowed load. Fixes PR37820. Reviewers: samparker, RKSimon, nemanjai Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D48335 llvm-svn: 335137
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D48350 llvm-svn: 335136
-
Sam Clegg authored
Summary: The waterfall no longer builds .s files and no longers uses the wasm-o when it builds object files. Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D48371 llvm-svn: 335135
-
Simon Pilgrim authored
This is part of a move towards generalizing the alternate opcode mechanism and not just supporting (F)Add/(F)Sub counterparts. The patch embeds the AltOpcode in the InstructionsState instead of calling getAltOpcode so often. I'm hoping to eventually remove all uses of getAltOpcode and handle alternate opcode selection entirely within getSameOpcode, that will require us to use InstructionsState throughout the BoUpSLP call hierarchy (similar to some of the changes in D28907), which I will begin in future patches. Differential Revision: https://reviews.llvm.org/D48359 llvm-svn: 335134
-
Andrea Di Biagio authored
llvm-svn: 335131
-
Simon Pilgrim authored
D47985 saw the old SK_Alternate 'alternating' shuffle mask replaced with the SK_Select mask which accepts either input operand for each lane, equivalent to a vector select with a constant condition operand. This patch updates SLPVectorizer to make full use of this SK_Select shuffle pattern by removing the 'isOdd()' limitation. The AArch64 regression will be fixed by D48172. Differential Revision: https://reviews.llvm.org/D48174 llvm-svn: 335130
-
Sanjay Patel authored
For both operands are unsigned, the following optimizations are valid, and missing: 1. X > Y && X != 0 --> X > Y 2. X > Y || X != 0 --> X != 0 3. X <= Y || X != 0 --> true 4. X <= Y || X == 0 --> X <= Y 5. X > Y && X == 0 --> false unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; } should fold to x > y, but I found we haven't done it right now. besides, unsigned foo(unsigned x, unsigned y) { return x < y && y != 0; } Has been folded to x < y, so there may be a bug. Patch by: Li Jia He! Differential Revision: https://reviews.llvm.org/D47922 llvm-svn: 335129
-
Sanjay Patel authored
These are the baseline tests for the functional change in D47922. Patch by Li Jia He! Differential Revision: https://reviews.llvm.org/D48000 llvm-svn: 335128
-
Alex Bradbury authored
These are produced by GCC and supported by GAS, but not currently contained in the pseudoinstruction listing in the RISC-V ISA manual. llvm-svn: 335127
-
Mikhail Dvoretckii authored
llvm-svn: 335126
-
Sam McCall authored
Summary: This is useful when hash collisions are unlikely and acceptable, e.g. in clangd completion ranking. Reviewers: ioeric Subscribers: ilya-biryukov, llvm-commits Differential Revision: https://reviews.llvm.org/D48361 llvm-svn: 335125
-
Krzysztof Parzyszek authored
Patch by Sumanth Gundapaneni. llvm-svn: 335124
-
Simon Dardis authored
Reviewers: atanasyan, abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D48166 llvm-svn: 335122
-
Sanjay Patel authored
This is similar to: rL335083 Fixes:: https://bugs.llvm.org/show_bug.cgi?id=37726 llvm-svn: 335121
-
Alex Bradbury authored
These are produced by GCC and supported by GAS, but not currently contained in the pseudoinstruction listing in the RISC-V ISA manual. llvm-svn: 335120
-
Tim Northover authored
Thumb has more 16-bit encoding space dedicated to ADD than ORR, allowing both a 3-address encoding and a wider range of immediates. So, particularly when optimizing for code size (but it doesn't make things worse elsewhere) it's beneficial to select an OR operation to an ADD if we know overflow won't occur. This is made even better by LLVM's penchant for putting operations in canonical form by converting the other way. llvm-svn: 335119
-