Commit Graph

31104 Commits

Author SHA1 Message Date
Amaury Sechet 6300a12e8b [X86] Automatically generate load-local-v3i1.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369793 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 18:12:33 +00:00
Craig Topper fc72162deb [X86] Mark VPDPWSSD and VPDPWSSDS as commutable. Add stack folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369792 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 18:05:37 +00:00
Amaury Sechet f617d679a3 [AMDGPU] Automatically generate various tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369787 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 17:58:49 +00:00
Amaury Sechet ada258617b [PowerPC] Automatically generate various tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369754 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 13:30:45 +00:00
Simon Pilgrim fe649a72d4 [DAGCombine] GetNegatedExpression - add FMA\FMAD support
If the accumulator and either of the multiply operands are negatable then we can we negate the entire expression.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369746 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 10:49:46 +00:00
Jay Foad 9c7f3a51fd [AMDGPU] gfx10 atomic optimizer changes.
Summary:
Add support for gfx10, where all DPP operations are confined to work
within a single row of 16 lanes, and wave32.

Reviewers: arsenm, sheredom, critson, rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, jfb, dstuttard, tpr, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369745 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 10:07:43 +00:00
Craig Topper db5694b33a [X86] Add a further unrolled madd reduction test case that shows several deficiencies.
The AVX2 check lines show two issues. An ADD that became an OR
because we knew the input was disjoint, but really it was zero
so we should have just removed the ADD/OR all together.

Relatedly we use 128-bit VPMADDWD instructions followed by
256-bit VPADDD operations. We should be able to narrow these
VPADDDs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369736 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 07:38:25 +00:00
Craig Topper fd9c089613 [X86] Improve lowering of v2i32 SAD handling in combineLoopSADPattern.
For v2i32 we only feed 2 i8 elements into the psadbw instructions
with 0s in the other 14 bytes. The resulting psadbw instruction
will produce zeros in bits [127:16] of the output. We need to take
the result and feed it to a v2i32 add where the first element
includes bits [15:0] of the sad result. The other element should
be zero.

Prior to this patch we were using a truncate to take 0 from
bits 95:64 of the psadbw. This results in a pshufd to move those
bits to 63:32. But since we also have zeroes in bits 63:32 of
the psadbw output, we should just take those bits.

The previous code probably worked better with promoting legalization,
but now we use widening legalization. I've preserved the old
behavior if -x86-experimental-vector-widening-legalization=false
until we get that option removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369733 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 05:33:27 +00:00
Amaury Sechet 487c33d3b4 [ARM] Automatically generate dsp-mlal.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369718 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 23:43:48 +00:00
Amaury Sechet 6471439995 [PowerPC] Automatically generate vec_buildvector_loadstore.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369703 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 20:42:50 +00:00
Amaury Sechet 20d933ffb0 [PowerPC] Automatically generate various tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369700 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 20:26:56 +00:00
Amaury Sechet c89a2e3890 [AArch64] autogenerate some tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369685 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 18:53:41 +00:00
Matt Arsenault 06bdf458f3 GlobalISel: Don't create G_UADDE with constant false carry in
The x86 tests are now broken (in paticular add-scalar.ll now hits the
DAG fallback) due to not handling G_UADDO. The DAG x86 backend has a
custom lowering for this, so that will need to be implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369673 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 17:29:17 +00:00
Guozhi Wei 83843cc07c [MBP] Disable aggressive loop rotate in plain mode
Patch https://reviews.llvm.org/D43256 introduced more aggressive loop layout optimization which depends on profile information. If profile information is not available, the statically estimated profile information(generated by BranchProbabilityInfo.cpp) is used. If user program doesn't behave as BranchProbabilityInfo.cpp expected, the layout may be worse.

To be conservative this patch restores the original layout algorithm in plain mode. But user can still try the aggressive layout optimization with -force-precise-rotation-cost=true.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369664 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 16:21:32 +00:00
Amaury Sechet f6826f8d24 [DAGCombiner] Remove explicit call to AddToWorklist in sqrt and reciprocal computations
Summary: These nodes end up being processed regardless due to DAGCombiner ensuring arguments are processed. This changes the order in which nodes are processed, which fixes an issue on PowerPC.

Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri, mcberg2017, stefanp, hfinkel

Subscribers: nemanjai, MaskRay, jsji, steven.zhang, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369662 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 15:35:45 +00:00
Simon Pilgrim bb63e152b1 [PowerPC] Regenerate reciprocal tests, as discussed on D66548
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369659 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 15:14:52 +00:00
Sam Tebbs c4632f26c1 Reapply: [ARM] Fix lsrl with a 128/256 bit shift amount or a shift of 32
The CodeGen/Thumb2/mve-vaddv.ll test needed to be amended to reflect the
changes from the above patch.

This reverts commit cd53ff6, reapplying 7c6b229.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369638 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 10:29:20 +00:00
Hans Wennborg 046a919d62 Revert r369626 "[ARM] Fix lsrl with a 128/256 bit shift amount or a shift of 32"
It broke the bots, see e.g. http://lab.llvm.org:8011/builders/clang-cuda-build/builds/36275/

> This patch fixes shifts by a 128/256 bit shift amount. It also fixes
> codegen for shifts of 32 by delegating to LLVM's default optimisation
> instead of emitting a long shift.
>
> Tests that used to generate long shifts of 32 are updated to check for the
> more optimised codegen.
>
> Differential revision: https://reviews.llvm.org/D66519
>
> llvm-svn: 369626

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 09:16:53 +00:00
Sam Tebbs ad39372e52 [ARM] Fix lsrl with a 128/256 bit shift amount or a shift of 32
This patch fixes shifts by a 128/256 bit shift amount. It also fixes
codegen for shifts of 32 by delegating to LLVM's default optimisation
instead of emitting a long shift.

Tests that used to generate long shifts of 32 are updated to check for the
more optimised codegen.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369626 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 08:12:06 +00:00
Fangrui Song 6254e3b489 [COFF] Fix section name for constants larger than 64 bits on Windows
APIntToHexString returns wrong value ("0000000000000000ffffffffffffffff")
for integer larger than 64 bits, and thus
TargetLoweringObjectFileCOFF::getSectionForConstant returns same section name
for all numbers larger than 64 bits. This patch tries to fix it.

Differential Revision: https://reviews.llvm.org/D66458
Patch by Senran Zhang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369610 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 01:48:34 +00:00
Nico Weber 59699b910d Revert r367389 (and follow-up r368404); it caused PR43073.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369567 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 19:53:42 +00:00
Sam Clegg b0b789435f [WebAssembly] Handle aliases in WebAssemblyFixFunctionBitcasts
Fixes: https://github.com/emscripten-core/emscripten/issues/8770

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369566 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 19:52:33 +00:00
Amaury Sechet ba93daf285 [DAGCombiner] Remove mostly redundant calls to AddToWorklist
Summary:
These calls change the order in which some nodes are processed and so have an effect on codegen.

The change in fixup-bw-copy.ll is due to (and (load anyext)) gets transformed into (load zext) while previously the and was removed by SimplifyDemandedBits, so the (load anyext) remained.

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

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369561 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 18:51:08 +00:00
Matt Arsenault 7c120abd60 GlobalISel: Implement moreElementsVector for G_UNMERGE_VALUES sources
This is necessary for handling <3 x s16> on AMDGPU, assuming this
should be handled as 2 separate legalization actions. The alternative
would be for fewerElementsVector to handle 3->2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 16:59:10 +00:00
Alexander Timofeev 7822759c5f [AMDGPU] Prevent VGPR copies from moving across the EXEC mask definitions
Differential Revision: https://reviews.llvm.org/D63731
Reviewers: qcolombet, rampitec

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369532 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 15:15:04 +00:00
Petar Avramovic d746620fcc [MIPS GlobalISel] NarrowScalar G_ZEXTLOAD and G_SEXTLOAD
NarrowScalar G_ZEXTLOAD and G_SEXTLOAD to s32 for MIPS32.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369512 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 09:43:20 +00:00
Petar Avramovic 1c722e7757 [MIPS GlobalISel] NarrowScalar G_ZEXT and G_SEXT
NarrowScalar G_ZEXT and G_SEXT to s32 for MIPS32.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369511 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 09:35:02 +00:00
Petar Avramovic 410e1dd408 [MIPS GlobalISel] Consider type1 when legalizing shifts after r351882
r351882 allows different type for shift amount then result and value
being shifted. Fix MIPS Legalizer rules to take r351882 into account.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369510 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 09:31:29 +00:00
Petar Avramovic 38f2f8c831 [MIPS GlobalISel] NarrowScalar G_TRUNC
Add NarrowScalar for G_TRUNC when NarrowTy is half the size of source.
NarrowScalar G_TRUNC to s32 for MIPS32.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369509 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 09:26:39 +00:00
Amara Emerson 4e6cb18b4b [AArch64][GlobalISel] Add support for narrowScalar of G_ZEXT
We do this by merging the source with the high bits set to 0.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369480 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 00:12:37 +00:00
Amaury Sechet c1a2c08745 [X86] Automatically generate shift tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369475 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 23:47:19 +00:00
Amaury Sechet 6600ba8022 [X86] Autogenerate vec_* tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369469 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 23:11:29 +00:00
Daniel Sanders 19818f5742 [RISCV GlobalISel] Adding initial GlobalISel infrastructure
Summary:
Add an initial GlobalISel skeleton for RISCV. It can only run ir translator for `ret void`.

Patch by Andrew Wei

Reviewers: asb, sabuasal, apazos, lenary, simoncook, lewis-revill, edward-jones, rogfer01, xiangzhai, rovka, Petar.Avramovic, mgorny, dsanders

Reviewed By: dsanders

Subscribers: pzheng, s.egerton, dsanders, hiraditya, rbar, johnrusso, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369467 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:53:24 +00:00
Jessica Paquette 2fac815faa [AArch64][GlobalISel] Select logical_imm32 and logical_imm64 patterns
Add a GlobalISel equivalent for the logical_imm32_XFORM and logical_imm64_XFORM
SDNodeXForms in AArch64InstrFormats.td.

- Add select-logical-imm.mir, which contains tests for each imported pattern.

- Update select-pr32733.mir and select-scalar-shift-imm.mir, since they now
select instructions of this form.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369465 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:31:25 +00:00
Jessica Paquette bb5c0f6c91 [AArch64][GlobalISel] Select patterns which use shifted register operands
This adds GlobalISel equivalents for the following from AArch64InstrFormats:

- arith_shifted_reg32
- arith_shifted_reg64

And partial support for

- logical_shifted_reg32
- logical_shifted_reg32

The only thing missing for the logical cases is support for rotates. Other than
the missing support, the transformation is identical for the arithmetic shifted
register and the logical shifted register.

Lots of tests here:

- Add select-arith-shifted-reg.mir to show that we correctly select add and
sub instructions which use this pattern.

- Add select-logical-shifted-reg.mir to cover patterns which are not shared
between the arithmetic and logical cases.

- Update addsub-shifted.ll to show that we correctly fold shifts into
adds/subs.

- Update eon.ll to show that we can select the eon instruction by folding xors.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369460 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:18:06 +00:00
Craig Topper 431ef0cefb [DAGCombiner][X86] Teach visitCONCAT_VECTORS to combine (concat_vectors (concat_vectors X, Y), undef)) -> (concat_vectors X, Y, undef, undef)
I also had to add a new combine to X86's combineExtractSubvector to prevent a regression.

This helps our vXi1 code see the full concat operation and allow it optimize undef to a zero if there is already a zero in the concat. This helped us use a movzx instead of an AND in some of the tests. In those tests, one concat comes from SelectionDAGBuilder and the second comes from type legalization of v4i1->i4 bitcasts which uses an additional concat. Though these changes weren't my original motivation.

I'm looking at making X86ISelLowering's narrowShuffle emit a concat_vectors instead of an insert_subvector since concat_vectors is more canonical during early DAG combine. This patch helps prevent a regression from my experiments with that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369459 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:12:50 +00:00
Reid Kleckner a5895f1ada Revert [WinEH] Allocate space in funclets stack to save XMM CSRs
This reverts r367088 (git commit 9ad565f70ec5fd3531056d7c939302d4ea970c83)

And the follow up fix r368631 / e9865b9b31bb2e6bc742dc6fca8f9f9517c3c43e

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369457 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:08:57 +00:00
Sean Fertile b0e685a1a3 Adds support for writing the .bss section for XCOFF object files.
Adds Wrapper classes for MCSymbol and MCSection into the XCOFF target
object writer. Also adds a class to represent the top-level sections, which we
materialize in the ObjectWriter.

executePostLayoutBinding will map all csects into the appropriate
container depending on its storage mapping class, and map all symbols
into their containing csect. Once all symbols have been processed we
- Assign addresses and symbol table indices.
- Calaculte section sizes.
- Build the section header table.
- Assign the sections raw-pointer value for non-virtual sections.

Since the .bss section is virtual, writing the header table is enough to
add support. Writing of a sections raw data, or of any relocations is
not included in this patch.

Testing is done by dumping the section header table, but it needs to be
extended to include dumping the symbol table once readobj support for
dumping auxiallary entries lands.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369454 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 22:03:18 +00:00
Martin Storsjo 2d1bb3817f [test] Fix tests when run on windows after SVN r369426. NFC.
When running tests on windows, invoking "llc -march=<arch>" will
implicitly use windows as the target os, making these tests misbehave
after this change.

Fix the issue by using more specific -mtriple values instead of plain
-march in these tests.

This should hopefully fix buildbot failures like
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/9816.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369443 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 20:58:02 +00:00
Craig Topper 1ecdae15ce [X86] Add a DAG combine to transform (i8 (bitcast (v8i1 (extract_subvector (v16i1 X), 0)))) -> (i8 (trunc (i16 (bitcast (v16i1 X))))) on KNL target
Without AVX512DQ we don't have KMOVB so we can't really copy 8-bits of a k-register to a GPR. We have to copy 16 bits instead. We do this even if the DAG copy is from v8i1->v16i1. If we detect the (i8 (bitcast (v8i1 (extract_subvector (v16i1 X), 0)))) we should rewrite the types to match the copy we do support. By doing this, we can help known bits to propagate without losing the upper 8 bits of the input to the extract_subvector. This allows some zero extends to be removed since we have an isel pattern to use kmovw for (zero_extend (i16 (bitcast (v16i1 X))).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369434 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 20:20:04 +00:00
Craig Topper 351e42b86e [X86] Add isel patterns for (i64 (zext (i8 (bitcast (v16i1 X))))) to use a KMOVW and a SUBREG_TO_REG. Similar for i8 and anyextend.
We already had patterns for extending to i32 to take advantage of
the impliciting zeroing of the upper bits of a 32-bit GPR that is
done by KMOVW/KMOVB. But the extend might be all the way to i64,
in which case the existing patterns would fail and we'd get a
KMOVW/B followed by a MOVZX. By adding patterns for i64 we can
use the fact that KMOVW/B zero the upper bits of the 32-bit GPR
and the normal property that 32-bit GPR writes implicitly zero the
upper 32-bits of the full 64-bit GPR.

The anyextend patterns are slightly different since we don't care
about the upper zeros. For the i8->i64 I think this avoids selecting
the anyextend as a MOVZX to prevent a partial register issue that
doesn't exist. For i16->i64 I think we would have just emitted an
insert_subreg on top of the extract_subreg that the vXi16->i16
bitcast pattern emits. The register coalescer or peephole pass
should combine those, but this saves that work and makes i8/16
consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369431 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 19:43:48 +00:00
Martin Storsjo f12390d9f5 [TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF
This avoids spurious relocation types for windows/elf targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369426 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 18:58:05 +00:00
Matt Arsenault 31b0c418f8 Revert "AMDGPU: Fix iterator error when lowering SI_END_CF"
This reverts r367500 and r369203. This is causing various test
failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369417 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 17:45:25 +00:00
Thomas Raoux 0d40c6e9dd [CodeGen] Add EarlyIfConvert test missed in previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369405 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 16:34:47 +00:00
Sam Tebbs 3479489a4b [ARM] Select vaddva
This patch adds vaddva selection.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369404 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 16:33:34 +00:00
Aditya Nandakumar 301f36987d [GlobalISel] Handle multiple registers in dbg.value intrinsic
https://reviews.llvm.org/D66077

The value passed into dbg.value may relate to multiple registers,
each of which need a DBG_VALUE.

This fix calls MIRBuilder.buildDirectDbgValue for each register.

Without this, IR passed in from flang-compiler/flang may fail an
assertion in getOrCreateVReg.

Patch by : peterwaller-arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369403 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 16:28:37 +00:00
Simon Pilgrim c97d8c2482 [X86][FMA] Add FMA 'negated expression' combine tests for D63141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369384 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 13:25:55 +00:00
Vyacheslav Zakharin 7d8acbb761 Fixed placement of llvm.global_dtors on Windows.
Differential revision: https://reviews.llvm.org/D66373

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369299 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-19 21:07:03 +00:00
Evgeniy Stepanov 4b91de2870 MemTag: stack initializer merging.
Summary:
MTE provides instructions to update memory tags and data at the same
time. This change makes use of those to generate more compact code for
stack variable tagging + initialization.

We collect memory store and memset instructions following an alloca or a
lifetime.start call, and replace them with the corresponding MTE
intrinsics. Since the intrinsics work on 16-byte aligned chunks, the
stored values are combined as necessary.

Reviewers: pcc, vitalybuka, ostannard

Subscribers: srhines, javed.absar, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369297 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-19 20:47:09 +00:00
Craig Topper d00a1ad97c [X86] Teach lowerV4I32Shuffle to only use broadcasts if the mask has more than one undef element. Prioritize shifts over broadcast in lowerV8I16Shuffle.
The motivating case are the changes in vector-reduce-add.ll where
we were doing extra work in the scalar domain instead of shuffling.
There may be some one use check that needs to be looked into there,
but this patch sidesteps the issue by avoiding broadcasts that
aren't really broadcasting.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369287 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-19 18:15:50 +00:00