Commit Graph

27305 Commits

Author SHA1 Message Date
Alex Bradbury c90bfa8715 [RISCV] Support .option relax and .option norelax
This extends the .option support from D45864 to enable/disable the relax 
feature flag from D44886

During parsing of the relax/norelax directives, the RISCV::FeatureRelax 
feature bits of the SubtargetInfo stored in the AsmParser are updated 
appropriately to reflect whether relaxation is currently enabled in the 
parser. When an instruction is parsed, the parser checks if relaxation is 
currently enabled and if so, gets a handle to the AsmBackend and sets the 
ForceRelocs flag. The AsmBackend uses a combination of the original 
RISCV::FeatureRelax feature bits set by e.g -mattr=+/-relax and the 
ForceRelocs flag to determine whether to emit relocations for symbol and 
branch diffs. Diff relocations should therefore only not be emitted if the 
relax flag was not set on the command line and no instruction was ever parsed 
in a section with relaxation enabled to ensure correct diffs are emitted.

Differential Revision: https://reviews.llvm.org/D46423
Patch by Lewis Revill.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346655 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 14:25:07 +00:00
Nirav Dave c5dba22c1d [DAGCombiner] Fix load-store forwarding of indexed loads.
Summary:
Handle extra output from index loads in cases where we wish to
forward a load value directly from a preceeding store.

Fixes PR39571.

Reviewers: peter.smith, rengolin

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346654 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 14:05:40 +00:00
Jonas Paulsson 79d60f6e81 [SystemZ] Replicate the load with most uses in buildVector()
Iterate over all elements and count the number of uses among them for each
used load. Then make sure to REPLICATE the load which has the most uses in
order to minimize the number of needed element insertions.

Review: Ulrich Weigand
https://reviews.llvm.org/D54322

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346637 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-12 08:12:20 +00:00
Sanjay Patel 89fcd8b878 [x86] auto-generate complete checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346609 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-11 14:57:26 +00:00
Craig Topper abb65ffd37 [X86] Use DAG.getConstant instead of getZeroVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346605 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-11 07:24:36 +00:00
Sanjay Patel f7b5c13b03 [x86] allow vector load narrowing with multi-use values
This is a long-awaited follow-up suggested in D33578. Since then, we've picked up even more
opportunities for vector narrowing from changes like D53784, so there are a lot of test diffs.
Apart from 2-3 strange cases, these are all wins.

I've structured this to be no-functional-change-intended for any target except for x86
because I couldn't tell if AArch64, ARM, and AMDGPU would improve or not. All of those
targets have existing regression tests (4, 4, 10 files respectively) that would be
affected. Also, Hexagon overrides the shouldReduceLoadWidth() hook, but doesn't show
any regression test diffs. The trade-off is deciding if an extra vector load is better
than a single wide load + extract_subvector.

For x86, this is almost always better (on paper at least) because we often can fold
loads into subsequent ops and not increase the official instruction count. There's also
some unknown -- but potentially large -- benefit from using narrower vector ops if wide
ops are implemented with multiple uops and/or frequency throttling is avoided.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346595 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 20:05:31 +00:00
Roman Lebedev 94d44f1161 [X86][BdVer2] Fix loads/stores throughput for Piledriver (PR39465)
There are two AGU units, and per 1cy, there can be either two loads,
or a load and a store; but not two stores, or two loads and a store.

Additionally, loads shouldn't affect the store scheduler and vice versa.
(but *should* affect the PdEX scheduler.)

Required rL346545.
Fixes https://bugs.llvm.org/show_bug.cgi?id=39465

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346587 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 14:31:43 +00:00
Craig Topper 01568d51f0 [X86] Use a MOVSX instruction instead of a MOVZX instruction in isel for an any_extend of the remainder from an 8-bit sdivrem.
The sdivrem will emit its own MOVSX to move %ah to the low byte of a register. By using a MOVSX for an any_extend this allows a post-isel peephole to merge them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 06:04:33 +00:00
Craig Topper 6c3e6aa542 [X86] Add a test case to show scalarized vector srem to demonstrate unnecessary instructions. NFC
After the division %ah is being sign extended to move it to lower byte of a register while avoiding a partial register read. We then zero extend the low byte to the full 32 bit register. But we don't use any of the zero extended bits. In the DAG the zero extend was really an any_extend so the sign extend should have been enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346580 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 06:04:09 +00:00
Matthias Braun 02fce9c9ac test/CodeGen/X86: Relax test case
No need to hardcode register or expecting totally unnecessary spills
from the allocator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346575 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 00:34:09 +00:00
Craig Topper bc177f5fc7 [X86] In LowerHorizontalByteSum, emit vector_shuffle nodes instead of directly using X86ISD::UNPCKL/X86ISD::UNPCKH.
This gives shuffle lowering the freedom to use zero_extend_vector_inreg for the unpckl shuffle. Shuffle combining usually makes this swap later, but not when AVX512 is enabled it seems.

While there also use DAG.getConstant to create a 0 vector instead of using the helper the forces a specific BUILD_VECTOR. I don't think that helper is usually needed. We're basically free to create a constant build_vector anytime and it will be legalized on its own.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346574 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-10 00:26:42 +00:00
Eli Friedman 25938772e8 [ARM64] [Windows] Handle funclets
This patch adds support for funclets in frame lowering and ISel
lowering. Together with D50288 and D50166, it enables C++ exception
handling.

Patch by Sanjin Sijaric, with some fixes by me.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346568 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 23:33:30 +00:00
Dylan McKay 9d4ebca282 [AVR] Reorder the CHECK lines in directmem.ll to match current trunk
In r346432 ("[DAGCombine] Improve alias analysis for chain of independent stores"),
the order of ldi/sts blocks changed.

The new IR is equivalent to the old IR.

This patch updates the test to fix the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346565 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 23:17:59 +00:00
Eli Friedman 35ef1bd84b [ARM] Add MemOperand to LDRcp to enable DCE.
LDRcp should be deleted when the dest register is dead in register
coalescing. Without MemOp, dead LDRcp will cause dead constant pool
value which references to non-existing label.

Patch by Yin Ma.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346563 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 23:09:17 +00:00
Thomas Lively e0105bee1f [WebAssembly] Disable custom NaN payload tests
Summary:
These tests fail on 32-bit builds because NaN payload bits in floating point
immediates are not necessarily preserved through compilation. This is because
the MC layer uses native doubles to store these values. The tests will be
reenabled once this problem has been fixed or deleted if we decide we don't care
about lowering payload bits.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346558 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 22:04:37 +00:00
Craig Topper 52d7ce62d6 [X86] Move the promotion of v16i16->v16i8 for avx512f but not avx512bw from lowering to isel. Change to use vpmovzx instead of vpmovsx.
With avx512f but not avx512bw we need to extend to v16i32 then truncate that to to v16i8. Previously we emitted both nodes during lowering, but I'm trying to switch to using target independent nodes and with that switched the extend+truncate wou

This patch changes the implementation to what will be necessary with that patch which helps minimize test diffs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346552 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 20:09:53 +00:00
Bryan Chan 0ea548887e [AArch64] Support HiSilicon's TSV110 processor
Reviewers: t.p.northover, SjoerdMeijer, kristof.beyls

Reviewed By: kristof.beyls

Subscribers: olista01, javed.absar, kristof.beyls, kristina, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346546 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 19:32:08 +00:00
Ulrich Weigand 4d8909c55d [SystemZ] Add a couple of missing tests
A few fp128 tests were omitted from test/CodeGen/SystemZ/fp-round-01.ll
since in early days, LLVM couldn't handle implicitly generated library
calls to functions with long double arguments on SystemZ.

This deficiency was actually long since fixed, but those tests are
still missing.  This patch adds the missing tests.  NFC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346541 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 19:16:21 +00:00
Paul Robinson 80691e1b43 [DWARFv5] Emit normal type units in .debug_info comdats.
Differential Revision: https://reviews.llvm.org/D54282

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346540 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 19:06:09 +00:00
Craig Topper 9ce4cce931 [X86] Turn X86ISD::VSEXT into X86ISD::VZEXT if the upper bits aren't demanded.
This makes X86ISD::VSEXT more similar to ISD::SIGN_EXTEND and ISD::ZERO_EXTEND.

I'm hoping to replace X86ISD::VSEXT/VZEXT with target independent nodes. Making the target specific nodes similar to the target independent nodes helps minimize test diffs in that patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346539 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 19:05:51 +00:00
Stanislav Mekhanoshin 8d5b2ca477 [AMDGPU] Cleanup optimize-if-exec-masking.mir test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346533 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 18:23:39 +00:00
Brendon Cahoon c5c6cf3239 [Hexagon] Implement noreturn optimization
Eliminate the stack frame in functions with the noreturn nounwind
attributes, and when the noreturn-stack-elim target feature is
enabled. This reduces the code and stack space needed for noreturn
functions.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346532 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 18:16:24 +00:00
Craig Topper 6b4d662418 [DAGCombiner][X86][Mips] Enable combineShuffleOfScalars to run between vector op legalization and DAG legalization. Fix bad one use check in combineShuffleOfScalars
It's possible for vector op legalization to generate a shuffle. If that happens we should give a chance for DAG combine to combine that with a build_vector input.

I also fixed a bug in combineShuffleOfScalars that was considering the number of uses on a undef input to a shuffle. We don't care how many times undef is used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346530 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 18:04:34 +00:00
Krzysztof Parzyszek dab756ad3e [Hexagon] Place globals with explicit .sdata section in small data
Both -fPIC and -G0 disable placement of globals in small data section,
but if a global has an explicit section assigmnent placing it in small
data, it should go there anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346523 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 17:31:22 +00:00
Zaara Syeda 7bade9c965 [Power9] Allow gpr callee saved spills in prologue to vectors registers
Currently in llvm, CalleeSavedInfo can only assign a callee saved register to
stack frame index to be spilled in the prologue. We would like to enable
spilling gprs to vector registers. This patch adds the capability to spill to
other registers aside from just the stack. It also adds the changes for power9
to spill gprs to volatile vector registers when they are available.
This happens only for leaf functions when using the option
-ppc-enable-pe-vector-spills.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346512 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 16:36:24 +00:00
Jonas Paulsson 66e6766eea [SystemZ] Avoid inserting same value after replication
A minor improvement of buildVector() that skips creating an
INSERT_VECTOR_ELT for a Value which has already been used for the
REPLICATE.

Review: Ulrich Weigand
https://reviews.llvm.org/D54315

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346504 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 15:44:28 +00:00
Nicolai Haehnle d3f6231202 AMDGPU: Add testcase to demonstrate a condition with pre-existing waitcnt
Relevant for https://reviews.llvm.org/D54226.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346501 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 15:13:12 +00:00
Sam Parker 72e06ac443 [ARM] Don't promote i1 types in ARM CGP
Now that we have mixed type sizes, i1 values need to be explicitly
handled as we want to avoid promoting these values.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346499 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 15:06:33 +00:00
Sanjay Patel 7dd8750708 [x86] try to form broadcast before widening shuffle elements
I noticed that we weren't generating broadcasts as much I thought we would with 
D54271, and this is part of the problem.

Widening the shuffle elements means adding bitcasts and hiding the relationship 
between a splatted scalar and the vector. If we can form a broadcast, do that 
before going through the rest of the shuffle lowering because broadcasts should 
be cheap and can often be load-folded.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346498 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 14:54:58 +00:00
Alex Bradbury a0f2a5f4a5 [RISCV] Avoid unnecessary XOR for seteq/setne 0
Differential Revision: https://reviews.llvm.org/D53492

Patch by James Clarke.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346497 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 14:47:36 +00:00
Alex Bradbury f9eeeb27cc [RISCV] Update test/CodeGen/RISCV/calling-conv.ll after rL346432
The DAGCombiner changes led to a different schedule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346496 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 14:35:44 +00:00
Alexandros Lamprineas 5e1b99cf3b [SelectionDAG] swap select_cc operands to enable folding
The DAGCombiner tries to SimplifySelectCC as follows:

  select_cc(x, y, 16, 0, cc) -> shl(zext(set_cc(x, y, cc)), 4)

It can't cope with the situation of reordered operands:

  select_cc(x, y, 0, 16, cc)

In that case we just need to swap the operands and invert the Condition Code:

  select_cc(x, y, 16, 0, ~cc)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346484 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 11:09:40 +00:00
Clement Courbet e6d7df955d [X86] Fix VZEROUPPER scheduling info on SNB,HSW,BDW,SXL,SKX.
Summary:
Starting from SNB, VZEROUPPER is handled by the renamer and uses no proc resources.
After HSW, it also has zero latency.

This fixes PR35606.

To reproduce:
Uops:
  llvm-exegesis -mode=uops -opcode-name=VZEROUPPER
Latency:
  echo -e '#LLVM-EXEGESIS-DEFREG XMM0 1\n#LLVM-EXEGESIS-DEFREG XMM1 1\nvzeroupper' | /tmp/llvm-exegesis -mode=latency -snippets-file=-
  echo -e '#LLVM-EXEGESIS-DEFREG XMM0 1\n#LLVM-EXEGESIS-DEFREG XMM1 1\nvzeroupper\naddps %xmm0, %xmm1' | /tmp/llvm-exegesis -mode=latency -snippets-file=-

Reviewers: RKSimon, craig.topper, andreadb

Subscribers: gbedwell, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346482 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 09:49:06 +00:00
Carlos Alberto Enciso 8381d3e303 [DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG.
In SimplifyCFG when given a conditional branch that goes to BB1 and BB2, the hoisted common terminator instruction in the two blocks, caused debug line records associated with subsequent select instructions to become ambiguous. It causes the debugger to display unreachable source lines.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346481 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 09:42:10 +00:00
Sam Parker 8e070ff595 [ARM] Enable mixed types in ARM CGP
Previously, during the search, all values had to have the same
'TypeSize', which is equal to number of bits of the integer type of
the icmp operand. All values in the tree had to match this size;
meaning that, if we searched from i16, we wouldn't accept i8s. A
change in type size requires zext and truncs to perform the casts so,
to allow mixed narrow types, the handling of these instructions is
now slightly different:

- we allow casts if their result or operand is <= TypeSize.
- zexts are sinks if their result > TypeSize.
- truncs are still sinks if their operand == TypeSize.
- truncs are still sources if their result == TypeSize.

The transformation bails on finding an icmp that operates on data
smaller than the current TypeSize.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346480 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 09:28:27 +00:00
Mandeep Singh Grang c36c93b184 [COFF, ARM64] Add support for MSVC buffer security check
Reviewers: rnk, mstorsjo, compnerd, efriedma, TomTan

Reviewed By: rnk

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346469 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 02:48:36 +00:00
Thomas Lively b1c6e08d95 [WebAssembly] Lower select for vectors
Summary:

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346462 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 01:38:44 +00:00
Heejin Ahn 50157fcabb [WebAssembly] Fix LowerEmscriptenEHSjLj when there's only longjmp
Summary:
The pass incorrectly assumed if there's a longjmp declaration in the
module, there is also a setjmp function declaration. Fixed it, and now
the pass only converts longjmp and does not do any other transformation
when there's no setjmp declaration in the module.

Fixes PR39562.

Reviewers: jgravelle-google, sbc100

Subscribers: dschuff, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346445 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 22:56:26 +00:00
Simon Pilgrim 495ee792d0 [X86] Regenerate loaduse test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346434 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 19:42:11 +00:00
Sanjay Patel 7b9cddc7bc [x86] use shuffles for scalar insertion into high elements of a constant vector
As discussed in D54073, we have a potential regression from more aggressive vector narrowing here, so let's try to avoid that by changing build-vector lowering slightly.

Insert-vector-element lowering always does this since there's no "pinsr" for ymm/zmm:

// If the vector is wider than 128 bits, extract the 128-bit subvector, insert
// into that, and then insert the subvector back into the result.

...but we can sometimes do better for insert-into-constant-vector by using shuffle lowering.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346433 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 19:16:27 +00:00
Nirav Dave e2baccfd07 [DAGCombine] Improve alias analysis for chain of independent stores.
FindBetterNeighborChains simulateanously improves the chain
dependencies of a chain of related stores avoiding the generation of
extra token factors. For chains longer than the GatherAllAliasDepths,
stores further down in the chain will necessarily fail, a potentially
significant waste and preventing otherwise trivial parallelization.

This patch directly parallelize the chains of stores before improving
each store. This generally improves DAG-level parallelism.

Reviewers: courbet, spatel, RKSimon, bogner, efriedma, craig.topper, rnk

Subscribers: sdardis, javed.absar, hiraditya, jrtc27, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346432 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 19:14:20 +00:00
Sanjay Patel 9d83280b4a [x86] add RUNs for AVX1; NFC
Differences in splat-ability might be reason to differentiate some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346426 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 18:18:20 +00:00
Nicolai Haehnle c335b4be87 Add test case for the regression caused by r344696
(That change has since been reverted.)

Reduced from https://bugs.freedesktop.org/show_bug.cgi?id=108611

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346423 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 18:01:38 +00:00
Davide Italiano d1851a2b7a Revert "[MSP430] Add MC layer"
This commit broke the module buildbots.
Error:

lib/Target/MSP430/MSP430GenAsmMatcher.inc:1027:1: error: redundant
namespace 'llvm' [-Wmodules-import-nested-redundant]
^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346410 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 16:21:29 +00:00
Jonas Paulsson 6355fcebb3 [SystemZ] Bugfix in shouldCoalesce()
It was discovered in randomized testing that the SystemZ implementation of
shouldCoalesce() could be caused to crash when subreg liveness was
enabled. This was because an undef use of the virtual register was copied
outside current MBB at the point of shouldCoalesce() being called. For more
details, see https://bugs.llvm.org/show_bug.cgi?id=39276.

This patch changes the check for MBB locality from livein/liveout checks to
do checks for all instructions of both intervals being inside MBB. This
avoids the cases with dead defs / undef uses outside MBB, which are not
affecting liveness in/out of MBB.

The original test case included as a reduced .mir test case.

Review: Ulrich Weigand
https://reviews.llvm.org/D54197

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346406 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 15:29:48 +00:00
Simon Pilgrim 1f494dbf92 [X86][SSE] Add PR39387 shuffle test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346402 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 14:07:17 +00:00
Petr Pavlu 10c750cc3f [ARM] Enable spilling of the hGPR register class in Thumb2
Generalize code in Thumb2InstrInfo::storeRegToStackSlot() and
loadRegToStackSlot() to allow the GPR class or any of its sub-classes
(including hGPR) to be stored/loaded by ARM::t2STRi12/ARM::t2LDRi12.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346401 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 13:02:10 +00:00
Simon Pilgrim 88a516ae34 [X86][AVX] Tidyup prefixes and regenerate interleaved tests
Share common AVX prefix and split off AVX2OR512 prefix instead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346399 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 12:14:10 +00:00
Thomas Lively 8319d448af [WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg
Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346384 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 02:35:28 +00:00
Stanislav Mekhanoshin 0db0961141 [AMDGPU] Extend promote alloca vectorization
Promote alloca can vectorize a small array by bitcasting it to a
vector type. Extend vectorization for the case when alloca is
already a vector type. We still want to replace GEPs with an
insert/extract element instructions in this case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346376 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 00:16:23 +00:00