Commit Graph

14093 Commits

Author SHA1 Message Date
Roman Lebedev
0203679424 [NFC][InstCombine] Shift amount reassociation: revisit flag preservation tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364657 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-28 16:36:53 +00:00
Roman Lebedev
4f9b5abd8a [NFC][InstCombine] Shift amount reassociation: add flag preservation test
As discussed in https://reviews.llvm.org/D63812#inline-569870
* exact on both lshr => exact https://rise4fun.com/Alive/plHk
* exact on both ashr => exact https://rise4fun.com/Alive/QDAA
* nuw on both shl => nuw https://rise4fun.com/Alive/5Uk
* nsw on both shl => nsw https://rise4fun.com/Alive/0plg

So basically if the same flag is set on both original shifts -> set it on new shift.
Don't think we can do anything with non-matching flags on shl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364652 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-28 15:32:52 +00:00
Cameron McInally
aca088eadf [NFC][Float2Int] Pre-commit unary FNeg test to basic.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364649 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-28 15:12:15 +00:00
Cameron McInally
c57ffd6937 [NFC][NewGVN] Pre-commit unary FNeg test to fpmath.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364646 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-28 14:39:58 +00:00
Sam Parker
6189e4972d [HardwareLoops] Loop counter guard intrinsic
Introduce llvm.test.set.loop.iterations which sets the loop counter
and also produces an i1 after testing that the count is not zero.

Differential Revision: https://reviews.llvm.org/D63809


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364628 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-28 07:38:16 +00:00
Cameron McInally
2585af80b5 [NFC][GVNSink] Pre-commit unary FNeg test to fpmath.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364597 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 21:23:07 +00:00
Cameron McInally
fd11f0fdb7 [GVN] Add support for unary FNeg to GVN pass
Differential Revision: https://reviews.llvm.org/D63896

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364592 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 21:05:02 +00:00
Cameron McInally
c35239a690 [NFC][GVN] Pre-commit unary FNeg tests to fpmath.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364587 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 20:33:44 +00:00
David Green
704b871cc4 [ARM] Move low overhead loop codegen tests into a separate file. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364565 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 16:56:41 +00:00
Johannes Doerfert
8a0fc5ba4f [Attr] Add "willreturn" function attribute
This patch introduces a new function attribute, willreturn, to indicate
that a call of this function will either exhibit undefined behavior or
comes back and continues execution at a point in the existing call stack
that includes the current invocation.

This attribute guarantees that the function does not have any endless
loops, endless recursion, or terminating functions like abort or exit.

Patch by Hideto Ueno (@uenoku)

Reviewers: jdoerfert

Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, lebedev.ri, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62801

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364555 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 15:51:40 +00:00
Sanjay Patel
696b128657 [InstCombine] remove 'tmp' names and regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364546 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 14:20:10 +00:00
Tim Northover
add655f51e IR: compare type attributes deeply when looking into functions.
FunctionComparator attempts to produce a stable comparison of two Function
instances by looking at all available properties. Since ByVal attributes now
contain a Type pointer, they are not trivially ordered and FunctionComparator
should use its own Type comparison logic to sort them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364523 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 11:44:45 +00:00
Stefan Stipanovic
ffa5500e3a [Attributor] Deducing existing nounwind attribute.
Adding nounwind deduction in new attributor framework.

Reviewers: jdoerfert, uenoku

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D63379

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364521 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 11:27:54 +00:00
Huihui Zhang
987d44f326 [InstCombine][NFCI] Fix test comments.
For fold
(X & (signbit l>> Y)) ==/!= 0 -> (X << Y) >=/< 0
(X & (signbit << Y)) ==/!= 0 -> (X l>> Y) >=/< 0

Test cases of X being constant are positive tests not negative.

Prep work for D62818.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364497 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-27 05:46:06 +00:00
Vasileios Porpodas
e39d2a4630 [SLP] Look-ahead operand reordering heuristic.
Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example).

Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk

Reviewed By: RKSimon, dtemirbulatov

Subscribers: rnk, rcorcs, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60897

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364478 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 21:25:24 +00:00
Sanjay Patel
cc807d0b39 [InstCombine] change 'tmp' variable names; NFC
I don't think there was anything going wrong here,
but the auto-generating CHECK line script is known
to have problems with 'TMP' because it uses that
to match nameless values.

This is a retry of rL364452.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364477 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 21:19:31 +00:00
Sanjay Patel
897d9b15ff Revert [InstCombine] change 'tmp' variable names; NFC
This reverts r364452 (git commit 6083ae0b4a250c69f6d5b13b3742ee1fe5b878d5)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364455 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 18:06:51 +00:00
Sanjay Patel
4451a1afc5 [InstCombine] change 'tmp' variable names; NFC
I don't think there was anything going wrong here,
but the auto-generating CHECK line script is known
to have problems with 'TMP' because it uses that
to match nameless values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364452 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 17:43:30 +00:00
Sanjay Patel
1e9c5e4d8a [InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364437 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 15:24:08 +00:00
Roman Lebedev
ee0ad15bc2 [NFC][InstCombine] Revisit one-use tests in shift-amount-reassociation-in-bittest.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364433 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 14:42:39 +00:00
Roman Lebedev
a32c72dc9f [NFC][InstCombine] Add shift amount reassociation in bittest tests (PR42399)
https://bugs.llvm.org/show_bug.cgi?id=42399
https://rise4fun.com/Alive/kBb
https://rise4fun.com/Alive/1SB

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364430 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 14:24:41 +00:00
Fedor Sergeev
9c871764b9 [InlineCost] cleanup calculations of Cost and Threshold
Summary:
Doing better separation of Cost and Threshold.
Cost counts the abstract complexity of live instructions, while Threshold is an upper bound of complexity that inlining is comfortable to pay.
There are two parts:
     - huge 15K last-call-to-static bonus is no longer subtracted from Cost
       but rather is now added to Threshold.

       That makes much more sense, as the cost of inlining (Cost) is not changed by the fact
       that internal function is called once. It only changes the likelyhood of this inlining
       being profitable (Threshold).

     - bonus for calls proved-to-be-inlinable into callee is no longer subtracted from Cost
       but added to Threshold instead.

While calculations are somewhat different,  overall InlineResult should stay the same since Cost >= Threshold compares the same.

Reviewers: eraman, greened, chandlerc, yrouban, apilipenko
Reviewed By: apilipenko
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60740

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364422 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 13:24:24 +00:00
Clement Courbet
6f6d98e186 Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."
Breaks sanitizers:
    libFuzzer :: cxxstring.test
    libFuzzer :: memcmp.test
    libFuzzer :: recommended-dictionary.test
    libFuzzer :: strcmp.test
    libFuzzer :: value-profile-mem.test
    libFuzzer :: value-profile-strcmp.test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364416 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 12:13:13 +00:00
Clement Courbet
e0fc543f4c [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.
This allows later passes (in particular InstCombine) to optimize more
cases.

One that's important to us is `memcmp(p, q, constant) < 0` and memcmp(p, q, constant) > 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364412 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 11:50:18 +00:00
Florian Hahn
cc3c3219a7 [LoopUnroll] Add support for loops with exiting headers and uncond latches.
This patch generalizes the UnrollLoop utility to support loops that exit
from the header instead of the latch. Usually, LoopRotate would take care
of must of those cases, but in some cases (e.g. -Oz), LoopRotate does
not kick in.

Codesize impact looks relatively neutral on ARM64 with -Oz + LTO.

Program                                         master     patch     diff
 External/S.../CFP2006/447.dealII/447.dealII   629060.00  627676.00  -0.2%
 External/SPEC/CINT2000/176.gcc/176.gcc        1245916.00 1244932.00 -0.1%
 MultiSourc...Prolangs-C/simulator/simulator   86100.00   86156.00    0.1%
 MultiSourc...arks/Rodinia/backprop/backprop   66212.00   66252.00    0.1%
 MultiSourc...chmarks/Prolangs-C++/life/life   67276.00   67312.00    0.1%
 MultiSourc...s/Prolangs-C/compiler/compiler   69824.00   69788.00   -0.1%
 MultiSourc...Prolangs-C/assembler/assembler   86672.00   86696.00    0.0%

Reviewers: efriedma, vsk, paquette

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D61962

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364398 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 09:16:57 +00:00
Roman Lebedev
688a304aca [NFC][InstCombine] Add shift amount reassociation tests (PR42391)
https://bugs.llvm.org/show_bug.cgi?id=42391
https://rise4fun.com/Alive/9E2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364393 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-26 08:17:05 +00:00
Huihui Zhang
ab07556fab [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0.
Simplify 'shl' inequality test into 'and' equality test.

This pattern happens in the middle-end while simplifying bitfield access,
Exposed in https://reviews.llvm.org/D63505

https://rise4fun.com/Alive/6uz

Reviewers: lebedev.ri, efriedma

Reviewed By: lebedev.ri

Subscribers: spatel, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364348 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 20:44:52 +00:00
Sanjay Patel
08e75cad94 [InstCombine] reduce checks for power-of-2-or-zero using ctpop
This follows up the transform from rL363956 to use the ctpop intrinsic when checking for power-of-2-or-zero.

This is matching the isPowerOf2() patterns used in PR42314:
https://bugs.llvm.org/show_bug.cgi?id=42314

But there's at least 1 instcombine follow-up needed to match the alternate form:

(v & (v - 1)) == 0;

We should have all of the backend expansions handled with:
rL364319
(x86-specific changes still needed for optimal code based on subtarget)

And the larger patterns to exclude zero as a power-of-2 are joining with this change after:
rL364153 ( D63660 )
rL364246

Differential Revision: https://reviews.llvm.org/D63777

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364341 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 18:51:44 +00:00
Simon Tatham
0be2584eea [ARM] Code-generation infrastructure for MVE.
This provides the low-level support to start using MVE vector types in
LLVM IR, loading and storing them, passing them to __asm__ statements
containing hand-written MVE vector instructions, and *if* you have the
hard-float ABI turned on, using them as function parameters.

(In the soft-float ABI, vector types are passed in integer registers,
and combining all those 32-bit integers into a q-reg requires support
for selection DAG nodes like insert_vector_elt and build_vector which
aren't implemented yet for MVE. In fact I've also had to add
`arm_aapcs_vfpcc` to a couple of existing tests to avoid that
problem.)

Specifically, this commit adds support for:

 * spills, reloads and register moves for MVE vector registers

 * ditto for the VPT predication mask that lives in VPR.P0

 * make all the MVE vector types legal in ISel, and provide selection
   DAG patterns for BITCAST, LOAD and STORE

 * make loads and stores of scalar FP types conditional on
   `hasFPRegs()` rather than `hasVFP2Base()`. As a result a few
   existing tests needed their llc command lines updating to use
   `-mattr=-fpregs` as their method of turning off all hardware FP
   support.

Reviewers: dmgreen, samparker, SjoerdMeijer

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60708

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364329 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 16:48:46 +00:00
Sam Parker
b0917b06be [ARM] Fix for DLS/LE CodeGen
The expensive buildbots highlighted the mir tests were broken, which
I've now updated and added --verify-machineinstrs to them. This also
uncovered a couple of bugs in the backend pass, so these have also
been fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364323 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 15:11:17 +00:00
Simon Pilgrim
0b9e0228e5 [SLPVectorizer] Precommit of supernode.ll test for D63661
This is a pre-commit of the tests introduced by the SuperNode SLP patch D63661.

Committed on behalf of @vporpo (Vasileios Porpodas)

Differential Revision: https://reviews.llvm.org/D63664

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364320 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 14:58:20 +00:00
Sam Parker
580eedab52 [ARM] DLS/LE low-overhead loop code generation
Introduce three pseudo instructions to be used during DAG ISel to
represent v8.1-m low-overhead loops. One maps to set_loop_iterations
while loop_decrement_reg is lowered to two, so that we can separate
the decrement and branching operations. The pseudo instructions are
expanded pre-emission, where we can still decide whether we actually
want to generate a low-overhead loop, in a new pass:
ARMLowOverheadLoops. The pass currently bails, reverting to an sub,
icmp and br, in the cases where a call or stack spill/restore happens
between the decrement and branching instructions, or if the loop is
too large.

Differential Revision: https://reviews.llvm.org/D63476


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364288 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 10:45:51 +00:00
Huihui Zhang
52325a3618 [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1.
Summary:
'shl' inequality test

```
  icmp ult/uge (shl %x, C2), C1 iff C1 is power of two
```

can be simplified as 'and' equality test

```
  icmp eq/ne (and %x, (lshr -C1, C2)), 0.
```

Reviewers: lebedev.ri, efriedma

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63670

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364256 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 00:14:02 +00:00
Huihui Zhang
e4223f994b [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier.
Summary:
To generate simplified IR, make sure fold
  (X & ~C) ==/!= 0 --> X u</u>= C+1

is scheduled before fold
  ((X << Y) & C) == 0 -> (X & (C >> Y)) == 0.

https://rise4fun.com/Alive/7ZN

Reviewers: lebedev.ri, efriedma, spatel, craig.topper

Reviewed By: lebedev.ri

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63505

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364255 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 00:09:10 +00:00
Sanjay Patel
1c6a395c06 [InstCombine] squash is-not-power-of-2 using ctpop
This is the Demorgan'd 'not' of the pattern handled in:
D63660 / rL364153

This is another intermediate IR step towards solving PR42314:
https://bugs.llvm.org/show_bug.cgi?id=42314

We can test if a value is not a power-of-2 using ctpop(X) > 1,
so combining that with an is-zero check of the input is the
same as testing if not exactly 1 bit is set:

(X == 0) || (ctpop(X) u> 1) --> ctpop(X) != 1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364246 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 22:35:26 +00:00
Matt Arsenault
8146d2023c InstCombine: Preserve nuw when reassociating nuw ops [3/3]
Alive says this is OK.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364235 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 21:37:03 +00:00
Matt Arsenault
7b5347fa6b InstCombine: Preserve nuw when reassociating nuw ops [2/3]
Alive says this is OK.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364234 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 21:37:02 +00:00
Matt Arsenault
c110ca7e66 InstCombine: Preserve nuw when reassociating nuw ops [1/3]
Alive says this is OK.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364233 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 21:36:59 +00:00
Cameron McInally
aeafce5719 [NFC][Reassociate] Add unary FNeg tests to fast-ReassociateVector.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364232 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 21:36:09 +00:00
Nikita Popov
2ba1c95516 [CVP] Reenable nowrap flag inference
Inference of nowrap flags in CVP has been disabled, because it
triggered a bug in LFTR (https://bugs.llvm.org/show_bug.cgi?id=31181).
This issue has been fixed in D60935, so we should be able to reenable
nowrap flag inference now.

Differential Revision: https://reviews.llvm.org/D62776

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364228 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 20:13:13 +00:00
Sanjay Patel
3368d9da53 [InstCombine] add tests for more variants of isPowerOf2; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364227 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 20:11:40 +00:00
Huihui Zhang
e702a1afad [InstCombine] Regenerate test pr17827. NFCI.
Prep work for upcoming patch D63505.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364224 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 19:49:42 +00:00
Philip Reames
72415d3093 [Tests] Add cases where we're failing to discharge provably loop exits (tests for D63733)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364220 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 19:26:17 +00:00
Cameron McInally
9960990081 [SLP] Support unary FNeg vectorization
Differential Revision: https://reviews.llvm.org/D63609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364219 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 19:24:23 +00:00
Sanjay Patel
0eaa3a2c7c [InstCombine] reduce funnel-shift i16 X, X, 8 to bswap X
Prefer the more exact intrinsic to remove a use of the input value
and possibly make further transforms easier (we will still need
to match patterns with funnel-shift of wider types as pieces of
bswap, especially if we want to canonicalize to funnel-shift with
constant shift amount). Discussed in D46760.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364187 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 15:20:49 +00:00
Sanjay Patel
cee72c8957 [InstCombine] add tests for funnel-shift to bswap; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364184 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 14:47:02 +00:00
Simon Pilgrim
31269a0a08 [InstCombine] SliceUpIllegalIntegerPHI - bail on out of range shifts
trunc(lshr) handling - if the shift is out of range (undefined) then bail like we do for non-constant shifts.

Fixes OSS Fuzz #15217


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364181 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 13:13:36 +00:00
Bjorn Pettersson
dfff6fc1d8 [Scalarizer] Add scalarizer support for smul.fix.sat
Summary:
Handle smul.fix.sat in the scalarizer. This is done by
adding smul.fix.sat to the set of "isTriviallyVectorizable"
intrinsics.

The addition of smul.fix.sat in isTriviallyVectorizable and
hasVectorInstrinsicScalarOpd can also be seen as a preparation
to be able to use hasVectorInstrinsicScalarOpd in ConstantFolding.

Reviewers: rengolin, RKSimon, dblaikie

Reviewed By: rengolin

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63704

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364177 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-24 12:07:11 +00:00
Philip Reames
d77254d26e [Tests] Autogen and improve test readability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364156 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-23 17:13:53 +00:00
Philip Reames
91371a5153 [IndVars] Remove dead instructions after folding trivial loop exit
In rL364135, I taught IndVars to fold exiting branches in loops with a zero backedge taken count (i.e. loops that only run one iteration).  This extends that to eliminate the dead comparison left around.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364155 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-23 17:06:57 +00:00