Commit Graph

3576 Commits

Author SHA1 Message Date
Sam Parker
3dd5242055 [ARM] TypeSize lower bound for ARMCodeGenPrepare
We only try to promote types with are smaller than 16-bits, but we
also need to check that the type is not less than 8-bits.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339770 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 13:29:50 +00:00
Sam Parker
81654d2362 [ARM] Allow signed icmps in ARMCodeGenPrepare
Treat signed icmps as 'sinks', allowing them to be in the use-def
tree, enabling more promotions to be performed. As a sink, any
promoted incoming values need to be truncated before being used by
the signed icmp.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339755 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 08:23:03 +00:00
Sam Parker
90048a8206 [ARM] Allow pointer values in ARMCodeGenPrepare
Add pointers to the list of allowed types, but don't try to promote
them. Also fixed a bug with the promotion of undef values, so a new
value is now created instead of mutating in place. We also now only
promote if there's an instruction in the use-def chains other than
the icmp, sinks and sources.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339754 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 07:52:35 +00:00
Luke Geeson
4514ca2f1d [ARM] Added FP16 VREV Vector Instrinsic CodeGen support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339546 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-13 08:37:41 +00:00
Eli Friedman
0365cb9494 [ARM] Adjust AND immediates to make them cheaper to select.
LLVM normally prefers to minimize the number of bits set in an AND
immediate, but that doesn't always match the available ARM instructions.
In Thumb1 mode, prefer uxtb or uxth where possible; otherwise, prefer
a two-instruction sequence movs+ands or movs+bics.

Some potential improvements outlined in
ARMTargetLowering::targetShrinkDemandedConstant, but seems to work
pretty well already.

The ARMISelDAGToDAG fix ensures we don't generate an invalid UBFX
instruction due to a larger-than-expected mask. (It's orthogonal, in
some sense, but as far as I can tell it's either impossible or nearly
impossible to reproduce the bug without this change.)

According to my testing, this seems to consistently improve codesize by
a small amount by forming bic more often for ISD::AND with an immediate.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339472 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-10 21:21:53 +00:00
Sam Parker
c709c56b9a [ARM] Disallow zexts in ARMCodeGenPrepare
Enabling ARMCodeGenPrepare by default caused a whole load of
failures. This is due to zexts and truncs not being handled properly.
ZExts are messy so it's just easier to disable for now and truncs
are allowed only as 'sinks'. I still need to figure out why allowing
them as 'sources' causes so many failures. The other main changes are
that we are explicit in the types that we converting to, it's now
always 'TypeSize'. Type support is also now performed while checking
for valid opcodes as it unnecessarily complicated having the checks
are different stages.
    
I've moved the tests around too, so we have the zext and truncs in
their own file as well as the overflowing opcode tests.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339432 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-10 13:57:13 +00:00
Evandro Menezes
5e77ae5ff5 [ARM] Replace processor check with feature
Add new feature, `FeatureUseWideStrideVFP`, that replaces the need for a
processor check.  Otherwise, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339354 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09 16:13:24 +00:00
Sjoerd Meijer
cc67ca7ead [ARM] FP16: codegen support for VTRN
Differential Revision: https://reviews.llvm.org/D50454


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339340 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09 12:45:09 +00:00
Petr Hosek
85ffa199e1 [ADT] Normalize empty triple components
LLVM triple normalization is handling "unknown" and empty components
differently; for example given "x86_64-unknown-linux-gnu" and
"x86_64-linux-gnu" which should be equivalent, triple normalization
returns "x86_64-unknown-linux-gnu" and "x86_64--linux-gnu". autoconf's
config.sub returns "x86_64-unknown-linux-gnu" for both
"x86_64-linux-gnu" and "x86_64-unknown-linux-gnu". This changes the
triple normalization to behave the same way, replacing empty triple
components with "unknown".

This addresses PR37129.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339294 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 22:23:57 +00:00
Eli Friedman
aae8303b43 [ARM] Avoid spilling lr with Thumb1 tail calls.
Normally, if any registers are spilled, we prefer to spill lr on Thumb1
so we can fold the "bx lr" into the "pop".  However, if there are tail
calls involved, restoring lr is expensive, so skip the optimization in
that case.

The spill of r7 in the new test also isn't necessary, but that's
mostly orthogonal to this patch. (It's the same code in
ARMFrameLowering, but it's not related to tail calls.)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339283 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 20:03:10 +00:00
Ties Stuij
741af08ef5 revert tests of '[CodeGen] emit inline asm clobber list warnings for reserved'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339276 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 17:19:32 +00:00
Ties Stuij
2235c76a9b [CodeGen] emit inline asm clobber list warnings for reserved
Summary:
Currently, in line with GCC, when specifying reserved registers like sp or pc on an inline asm() clobber list, we don't always preserve the original value across the statement. And in general, overwriting reserved registers can have surprising results.

For example:


```
extern int bar(int[]);

int foo(int i) {
  int a[i]; // VLA
  asm volatile(
      "mov r7, #1"
    :
    :
    : "r7"
  );

  return 1 + bar(a);
}
```

Compiled for thumb, this gives:
```
$ clang --target=arm-arm-none-eabi -march=armv7a -c test.c -o - -S -O1 -mthumb
...
foo:
        .fnstart
@ %bb.0:                                @ %entry
        .save   {r4, r5, r6, r7, lr}
        push    {r4, r5, r6, r7, lr}
        .setfp  r7, sp, #12
        add     r7, sp, #12
        .pad    #4
        sub     sp, #4
        movs    r1, #7
        add.w   r0, r1, r0, lsl #2
        bic     r0, r0, #7
        sub.w   r0, sp, r0
        mov     sp, r0
        @APP
        mov.w   r7, #1
        @NO_APP
        bl      bar
        adds    r0, #1
        sub.w   r4, r7, #12
        mov     sp, r4
        pop     {r4, r5, r6, r7, pc}
...
```

r7 is used as the frame pointer for thumb targets, and this function needs to restore the SP from the FP because of the variable-length stack allocation a. r7 is clobbered by the inline assembly (and r7 is included in the clobber list), but LLVM does not preserve the value of the frame pointer across the assembly block.

This type of behavior is similar to GCC's and has been discussed on the bugtracker: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11807 . No consensus seemed to have been reached on the way forward.  Clang behavior has briefly been discussed on the CFE mailing (starting here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058392.html). I've opted for following Eli Friedman's advice to print warnings when there are reserved registers on the clobber list so as not to diverge from GCC behavior for now.

The patch uses MachineRegisterInfo's target-specific knowledge of reserved registers, just before we convert the inline asm string in the AsmPrinter.

If we find a reserved register, we print a warning:
```
repro.c:6:7: warning: inline asm clobber list contains reserved registers: R7 [-Winline-asm]
      "mov r7, #1"
      ^
```

Reviewers: eli.friedman, olista01, javed.absar, efriedma

Reviewed By: efriedma

Subscribers: efriedma, eraman, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339257 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 15:15:59 +00:00
Sjoerd Meijer
497f7d27c6 [ARM][NFC] Replaced tab-characters in test file vtrn.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339251 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 14:42:11 +00:00
Sjoerd Meijer
52db212f74 [ARM] FP16: codegen support for VEXT
Differential Revision: https://reviews.llvm.org/D50427


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339241 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 13:26:38 +00:00
Sjoerd Meijer
32fc17a357 [ARM] FP16: vector vmov and vdup support
This adds codegen support for the vmov_n_f16 and vdup_n_f16 variants.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339238 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 13:11:31 +00:00
Sjoerd Meijer
648f1e065d [ARM] FP16: vector VMUL variants
This adds codegen support for the vmul_lane_f16 and vmul_n_f16 variants.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339232 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 10:27:34 +00:00
Sjoerd Meijer
93ef7cf14b [ARM] FP16: support vector INT_TO_FP and FP_TO_INT
This adds codegen support for the different vcvt_f16 variants.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339227 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 09:45:34 +00:00
Thomas Preud'homme
ba39c1b56c Support inline asm with multiple 64bit output in 32bit GPR
Summary: Extend fix for PR34170 to support inline assembly with multiple output operands that do not naturally go in the register class it is constrained to (eg. double in a 32-bit GPR as in the PR).

Reviewers: bogner, t.p.northover, lattner, javed.absar, efriedma

Reviewed By: efriedma

Subscribers: efriedma, tra, eraman, javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339225 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 09:35:26 +00:00
Sjoerd Meijer
ea2a187f0d [ARM] FP16: support the vector vmin and vmax variants
Differential Revision: https://reviews.llvm.org/D50238


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339221 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 07:20:15 +00:00
Sjoerd Meijer
5aa74422b6 [ARM] FP16: codegen support for VACGT
Differential Revision: https://reviews.llvm.org/D50236


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339148 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-07 15:11:47 +00:00
Sjoerd Meijer
20e8e6e68f [ARM][NFC] Replaced tab characters in test file vfcmp.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339111 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-07 08:05:15 +00:00
Sjoerd Meijer
3349324422 [ARM] FP16: support vector zip and unzip
This is addressing PR38404.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338835 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 09:24:29 +00:00
Sjoerd Meijer
0c1e01d11a [ARM] FP16: support VFMA
This is addressing PR38404.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338830 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 09:12:56 +00:00
Sjoerd Meijer
5907e1ea98 [ARM][NFC] Follow up of r338568
I disabled more tests than necessary, this enables them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338717 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02 14:04:48 +00:00
Alexander Ivchenko
8c575a1c2e [GlobalISel] Rewrite CallLowering::lowerReturn to accept multiple VRegs per Value
This is logical continuation of https://reviews.llvm.org/D46018 (r332449)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338685 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02 08:33:31 +00:00
Sjoerd Meijer
6260bdfbb9 [ARM] Armv8.2-A FP16 vector intrinsics tests
Clang support for the Armv8.2-A FP16 vector intrinsic was committed in
rC328277, but this was never followed up, i.e. the LLVM part is missing.

I've raised PR38404, and this is the first step to address this. I.e.,
this adds tests for the Armv8.2-A FP16 vector intrinsic, and thus shows
which intrinsics already work, and which need further work.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338568 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-01 14:43:59 +00:00
Reid Kleckner
1fa19f6800 Revert r338354 "[ARM] Revert r337821"
Disable ARMCodeGenPrepare by default again. It is causing verifier
failues in V8 that look like:

  Duplicate integer as switch case
  switch i32 %trunc, label %if.end13 [
    i32 0, label %cleanup36
    i32 0, label %if.then8
  ], !dbg !4981
  i32 0
  fatal error: error in backend: Broken function found, compilation aborted!

I will continue reducing the test case and send it along.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338452 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 23:09:42 +00:00
Sam Parker
a52192cab5 [ARM] Revert r337821
Re-enabling ARMCodeGenPrepare by default after failing to reproduce
the bootstrap issues that I was concerned it was causing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338354 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-31 09:04:14 +00:00
Thomas Preud'homme
005ad0240a Reapply "Fix crash on inline asm with 64bit matching input in 32bit GPR"
This reapplies commit r338206 reverted by r338214 since the bug that
r338206 uncovered has been fixed in r338268.

Add support for inline assembly with matching input operand that do not
naturally go in the register class it is constrained to (eg. double in a
32-bit GPR). Note that regular input is already handled by existing
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338269 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 16:48:39 +00:00
Thomas Preud'homme
690afef84f Fix uninitialized read in ARM's PrintAsmOperand
Summary:
Fix read of uninitialized RC variable in ARM's PrintAsmOperand when
hasRegClassConstraint returns false. This was causing
inline-asm-operand-implicit-cast test to fail in r338206.

Reviewers: t.p.northover, weimingz, javed.absar, chill

Reviewed By: chill

Subscribers: chill, eraman, kristof.beyls, chrib, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338268 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 16:45:40 +00:00
Petr Pavlu
dc8a4c5d74 [ARM] Fix over-alignment in arguments that are HA of 128-bit vectors
Code in `CC_ARM_AAPCS_Custom_Aggregate()` is responsible for handling
homogeneous aggregates for `CC_ARM_AAPCS_VFP`. When an aggregate ends up
fully on stack, the function tries to pack all resulting items of the
aggregate as tightly as possible according to AAPCS.

Once the first item was laid out, the alignment used for consecutive
items was the size of one item. This logic went wrong for 128-bit
vectors because their alignment is normally only 64 bits, and so could
result in inserting unexpected padding between the first and second
element.

The patch fixes the problem by updating the alignment with the item size
only if this results in reducing it.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338233 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 08:49:30 +00:00
Sanjay Patel
04eda8fb6f revert r338206 because the test does not pass
Example of bot failure:
http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/5107/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Ainline-asm-operand-implicit-cast.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338214 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-29 14:30:49 +00:00
Thomas Preud'homme
789dd7b805 Fix crash on inline asm with 64bit matching input in 32bit GPR
Add support for inline assembly with matching input operand that do not
naturally go in the register class it is constrained to (eg. double in a
32-bit GPR). Note that regular input is already handled by existing
code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338206 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-28 21:33:39 +00:00
Craig Topper
fefdba1e17 [DAGCombiner] Teach DAG combiner that A-(B-C) can be folded to A+(C-B)
This can be useful since addition is commutable, and subtraction is not.

This matches a transform that is also done by InstCombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338181 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-28 00:27:25 +00:00
Evandro Menezes
dd4e083abf [ARM] Add new target feature to fuse literal generation
This feature enables the fusion of such operations on Cortex A57 and Cortex
A72, as recommended in their Software Optimisation Guides, sections 4.14 and
4.11, respectively.

Differential revision: https://reviews.llvm.org/D49563

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338147 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 18:16:47 +00:00
Thomas Preud'homme
ac1626ec4d Fix PR34170: Crash on inline asm with 64bit output in 32bit GPR
Add support for inline assembly with output operand that do not
naturally go in the register class it is constrained to (eg. double in a
32-bit GPR as in the PR).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337903 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 11:11:12 +00:00
Sam Parker
99421a402f [ARM] Disable ARMCodeGenPrepare by default
ARM Stage 2 builders have been suspiciously broken since the pass was
committed. Disabling to hopefully fix the bots and give me time to
debug.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337821 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 12:04:23 +00:00
Sam Parker
942fbb2330 [ARM] ARMCodeGenPrepare backend pass
Arm specific codegen prepare is implemented to perform type promotion
on icmp operands, which can enable the removal of uxtb and uxth
(unsigned extend) instructions. This is possible because performing
type promotion before ISel alleviates this duty from the DAG builder
which has to perform legalisation, but has a limited view on data
ranges.
    
The pass visits any instruction operand of an icmp and creates a
worklist to traverse the use-def tree to determine whether the values
can simply be promoted. Our concern is values in the registers
overflowing the narrow (i8, i16) data range, so instructions marked
with nuw can be promoted easily. For add and sub instructions, we are
able to use the parallel dsp instructions to operate on scalar data
types and avoid overflowing bits. Underflowing adds and subs are also
permitted when the result is only used by an unsigned icmp.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337687 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 12:27:47 +00:00
Evandro Menezes
6649de34e9 [ARM] Add new feature to enable optimizing the VFP registers
Enable the optimization of operations on DPR and SPR via a feature instead
of checking the target.

Differential revision: https://reviews.llvm.org/D49463

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337575 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 16:49:28 +00:00
Tim Northover
95f104ac2d ARM: switch armv7em MachO triple to hard-float defaults and libcalls.
We were emitting incorrect calls to libm functions that LLVM had decided it
knew about because the default is soft-float.

Recommitted without breaking ELF this time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337450 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19 12:44:51 +00:00
Tim Northover
f7eb2f0fcb Revert "ARM: switch armv7em triple to hard-float defaults and libcalls."
This reverts commit r337385 until it can be targeted at MachO only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337424 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18 21:32:49 +00:00
Tim Northover
feb1bb8b82 ARM: switch armv7em triple to hard-float defaults and libcalls.
We were emitting incorrect calls to libm functions that LLVM had decided it
knew about because the default is soft-float.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337385 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18 12:37:04 +00:00
Simon Pilgrim
ead04a9559 [DAGCombiner] Call SimplifyDemandedVectorElts from EXTRACT_VECTOR_ELT
If we are only extracting vector elements via EXTRACT_VECTOR_ELT(s) we may be able to use SimplifyDemandedVectorElts to avoid unnecessary vector ops.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337258 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17 09:45:35 +00:00
Simon Pilgrim
19f4c1ecb2 [ARM] Regenerated arg endian test
As requested on D49262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336980 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 09:16:56 +00:00
Joel E. Denny
ce57a4ff8c [FileCheck] Add -allow-deprecated-dag-overlap to failing llvm tests
See https://reviews.llvm.org/D47106 for details.

Reviewed By: probinson

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

This commit drops that patch's changes to:

  llvm/test/CodeGen/NVPTX/f16x2-instructions.ll
  llvm/test/CodeGen/NVPTX/param-load-store.ll

For some reason, the dos line endings there prevent me from commiting
via the monorepo.  A follow-up commit (not via the monorepo) will
finish the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336843 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 20:25:49 +00:00
Sjoerd Meijer
f72585ca17 [ARM] ParallelDSP: multiple reduction stmts in loop
This fixes an issue that we were not properly supporting multiple reduction
stmts in a loop, and not generating SMLADs for these cases. The alias analysis
checks were done too early, making it too conservative.

Differential revision: https://reviews.llvm.org/D49125


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336795 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-11 12:36:25 +00:00
Eli Friedman
43b8da3b5b [ARM] Treat cmn immediates as legal in isLegalICmpImmediate.
The original code attempted to do this, but the std::abs() call didn't
actually do anything due to implicit type conversions.  Fix the type
conversions, and perform the correct check for negative immediates.

This probably has very little practical impact, but it's worth fixing
just to avoid confusion in the future, I think.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336742 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10 23:44:37 +00:00
Nico Weber
5b4b9a07e8 Revert 336426 (and follow-ups 428, 440), it very likely caused PR38084.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336453 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-06 17:37:24 +00:00
Sjoerd Meijer
f36b7500f8 [ARM] ParallelDSP: added statistics, NFC.
Added statistics for the number of SMLAD instructions created, and
als renamed the pass name to -arm-parallel-dsp.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336441 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-06 14:47:09 +00:00
Diogo N. Sampaio
ef8af9b997 Commit rL336426 cause buildbot failures
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/50537/testReport/junit/LLVM/CodeGen_AArch64/FoldRedundantShiftedMasking_ll/

This removes the comments of the function label causing this error.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336440 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-06 14:41:09 +00:00