- Jul 01, 2019
-
-
Roman Lebedev authored
Summary: To be noted, this pattern is not unhandled by instcombine per-se, it is somehow does end up being folded when one runs opt -O3, but not if it's just -instcombine. Regardless, that fold is indirect, depends on some other folds, and is thus blind when there are extra uses. This does address the regression being exposed in D63992. https://godbolt.org/z/7DGltU https://rise4fun.com/Alive/EPO0 Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42459 | PR42459 ]] Reviewers: spatel, nikic, huihuiz Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63993 llvm-svn: 364792
-
Roman Lebedev authored
Summary: Given pattern: `icmp eq/ne (and ((x shift Q), (y oppositeshift K))), 0` we should move shifts to the same hand of 'and', i.e. rewrite as `icmp eq/ne (and (x shift (Q+K)), y), 0` iff `(Q+K) u< bitwidth(x)` It might be tempting to not restrict this to situations where we know we'd fold two shifts together, but i'm not sure what rules should there be to avoid endless combine loops. We pick the same shift that was originally used to shift the variable we picked to shift: https://rise4fun.com/Alive/6x1v Should fix [[ https://bugs.llvm.org/show_bug.cgi?id=42399 | PR42399]]. Reviewers: spatel, nikic, RKSimon Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63829 llvm-svn: 364791
-
Krzysztof Parzyszek authored
llvm-svn: 364790
-
Matt Arsenault authored
llvm-svn: 364789
-
Nicolai Haehnle authored
Summary: The stride should depend on the wave size, not the hardware generation. Also, the 32_FLOAT format is 0x16, not 16; though that shouldn't be relevant. Change-Id: I088f93bf6708974d085d1c50967f119061da6dc6 Reviewers: arsenm, rampitec, mareko Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63808 llvm-svn: 364788
-
Matt Arsenault authored
This is easy to handle and avoids legalization artifacts which are likely to obscure combines. llvm-svn: 364787
-
Matt Arsenault authored
llvm-svn: 364786
-
Matt Arsenault authored
isVCC has the same bug, but isn't used in a context where it can cause a problem. llvm-svn: 364784
-
Matt Arsenault authored
llvm-svn: 364783
-
Matt Arsenault authored
llvm-svn: 364782
-
Diana Picus authored
Fix stack-use-after-scope errors from r364512. One instance was already fixed in r364611 - this patch simplifies that fix and addresses one more instance of similar code. Discussed in: https://reviews.llvm.org/D63905 llvm-svn: 364778
-
Jinsong Ji authored
Summary: SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285 This works for some loops. However, we may generate lines with loop comments only. And since we don't scrub leading white spaces, this will leave an empty line there, and FileCheck will complain it. eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15: error: found empty check string with prefix 'CHECK:' ; CHECK-NEXT: This prevented us from using the `update_llc_test_checks.py` for quite some cases. We should still keep the comment token there, so that we can safely scrub the loop comment without breaking FileCheck. Reviewers: timshen, hfinkel, lebedev.ri, RKSimon Subscribers: nemanjai, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63957 llvm-svn: 364775
-
Roman Lebedev authored
As discussed in https://reviews.llvm.org/D63829 *if* *both* shifts are one-use, we'd most likely want to produce `lshr`, and not rely on ordering. Also, there should likely be a *separate* fold to do this reordering. llvm-svn: 364772
-
Krzysztof Parzyszek authored
Add code to catch pattern for commutative instructions for VLCR. Patch by Suyog Sarda. llvm-svn: 364770
-
Matt Arsenault authored
llvm-svn: 364769
-
Matt Arsenault authored
llvm-svn: 364768
-
Matt Arsenault authored
llvm-svn: 364767
-
Matt Arsenault authored
llvm-svn: 364766
-
Matt Arsenault authored
Select s64 eq/ne scalar icmp. llvm-svn: 364765
-
Roman Lebedev authored
So we indeed to have this fold, but only if +1 is not the last operation.. llvm-svn: 364764
-
Matt Arsenault authored
llvm-svn: 364763
-
Matt Arsenault authored
llvm-svn: 364762
-
Matt Arsenault authored
This was checking the size of the register with the value of the size, which happens to be exec. Also fix assuming VCC is 64-bit to fix wave32. Also remove some untested handling for physical registers which is skipped. This doesn't insert the V_CNDMASK_B32 if SCC is the physical copy source. I'm not sure if this should be trying to handle this special case instead of dealing with this in copyPhysReg. llvm-svn: 364761
-
Matt Arsenault authored
Zext from s1 is the only case where this should do anything with the current legal extensions. llvm-svn: 364760
-
Matt Arsenault authored
llvm-svn: 364759
-
Matt Arsenault authored
llvm-svn: 364758
-
Simon Atanasyan authored
llvm-svn: 364757
-
Simon Atanasyan authored
llvm-svn: 364756
-
Simon Atanasyan authored
llvm-svn: 364755
-
Florian Hahn authored
isLoopExiting should only be called for blocks in the loop. A follow up patch makes this requirement an assertion. I've updated the usage here, to only match for actual exit blocks. Previously, it would also match blocks not in the loop. Reviewers: arsenm, nhaehnle Reviewed By: nhaehnle Differential Revision: https://reviews.llvm.org/D63980 llvm-svn: 364750
-
Roman Lebedev authored
To be noted, this pattern is not unhandled by instcombine per-se, it is somehow does end up being folded when one runs opt -O3, but not if it's just -instcombine. Regardless, that fold is indirect, depends on some other folds, and is thus blind when there are extra uses. https://bugs.llvm.org/show_bug.cgi?id=42459 https://rise4fun.com/Alive/EPO0 llvm-svn: 364749
-
Fangrui Song authored
As suggested by jrtc27 in the post-commit review of D60528. llvm-svn: 364746
-
Simon Pilgrim authored
CombineShuffleWithExtract no longer requires that both shuffle ops are extract_subvectors, from the same type or from the same size. llvm-svn: 364745
-
Benjamin Kramer authored
The SDAGBuilder behavior stems from the days when we didn't have fast math flags available in SDAG. We do now and doing the transformation in the legalizer has the advantage that it also works for vector types. llvm-svn: 364743
-
Andrew Ng authored
Disabled CMake get_git_version as it is meaningless for this in-tree build, and hardcoded a null version. Not using get_git_version avoids a refresh of the git index that is executed by get_git_version. Refreshing the index can take a considerable amount of time if the index needs to be refreshed (particularly with the mono repo). This situation can arise when building shared source on a host in VMs. Differential Revision: https://reviews.llvm.org/D63925 llvm-svn: 364742
-
Roman Lebedev authored
https://bugs.llvm.org/show_bug.cgi?id=42457 https://rise4fun.com/Alive/iFhE llvm-svn: 364739
-
Roman Lebedev authored
This was added in D63390 / rL364286 to backend, but it makes sense to also handle it in middle-end. https://rise4fun.com/Alive/Zsln llvm-svn: 364738
-
Roman Lebedev authored
Was added in D63390 / rL364286 to backend, but it makes sense to also handle it here. https://rise4fun.com/Alive/Zsln llvm-svn: 364737
-
Jeremy Morse authored
This patch addresses PR41675, where a stack-pointer variable is dereferenced too many times by its location expression, presenting a value on the stack as the pointer to the stack. The difference between a stack *pointer* DBG_VALUE and one that refers to a value on the stack, is currently the indirect flag. However the DWARF backend will also try to guess whether something is a memory location or not, based on whether there is any computation in the location expression. By simply prepending the stack offset to existing expressions, we can accidentally convert a register location into a memory location, which introduces a suprise (and unintended) dereference. The solution is to add DW_OP_stack_value whenever we add a DIExpression computation to a stack *pointer*. It's an implicit location computed on the expression stack, thus needs to be flagged as a stack_value. For the edge case where the offset is zero and the location could be a register location, DIExpression::prepend will still generate opcodes, and thus DW_OP_stack_value must still be added. Differential Revision: https://reviews.llvm.org/D63429 llvm-svn: 364736
-
Yevgeny Rouban authored
Differential Revision: https://reviews.llvm.org/D60606 llvm-svn: 364734
-