Commit Graph

527 Commits

Author SHA1 Message Date
Jonas Paulsson
9129f92efa Recommit "[SystemZ] Do not emit VEXTEND or VROUND nodes without vector support."
It seems there were some problem with using a .mir test. For some reason
doing '-stop-before=codegenprepare' and then '-start-before=codegenprepare'
on the output .mir file results in the NoVRegs Property after instruction
selection.

Recommitting the same test as an .ll file instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354160 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-15 19:13:55 +00:00
Francis Visoiu Mistrih
5716349e30 Revert "[SystemZ] Do not emit VEXTEND or VROUND nodes without vector support."
This reverts commit aa0b77d3395dc6ab91647138139c1a15a3aa088d.

This fails to pass the machine verifier:
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/13579/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354096 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-15 03:01:09 +00:00
Jonas Paulsson
05fc6965d5 [SystemZ] Do not emit VEXTEND or VROUND nodes without vector support.
Review: Ulrich Weigand
https://reviews.llvm.org/D58240

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354039 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 17:58:48 +00:00
Jonas Paulsson
3044368de2 [SystemZ] Use VGM whenever possible to load FP immediates.
isFPImmLegal() has been extended to recognize certain FP immediates that can
be built with VGM (Vector Generate Mask).

These scalar FP immediates (that were previously loaded from the constant
pool) are now selected as VGMF/VGMG in Select().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353867 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-12 18:06:06 +00:00
Jonas Paulsson
0e5a502581 [SystemZ] Improved handling of the @llvm.ctlz intrinsic.
Since SystemZ supports counting of leading zeros with the FLOGR instruction,
isCheapToSpeculateCtlz() should return true, which it now does.

ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which
is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only
expanded to CTLZ if it is Legal or Custom.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353330 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-06 19:23:31 +00:00
Jonas Paulsson
954d6be705 [SystemZ] Wait with VGBM selection until after DAGCombine2.
Don't lower BUILD_VECTORs to BYTE_MASK, but instead expose the BUILD_VECTORs
to the DAGCombiner and select them to VGBM in Select(). This allows the
DAGCombiner to understand the constant vector values.

For floating point, only all-zeros vectors are now generated with VGBM, as it
turned out to be somewhat complicated to handle any arbitrary constants,
while in practice this is very rare and hardly needed.

The SystemZ ISD opcodes z_byte_mask, z_vzero and z_vones have been removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353325 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-06 18:59:19 +00:00
Ulrich Weigand
44f220f910 [SystemZ] Do not return INT_MIN from strcmp/memcmp
The IPM sequence currently generated to compute the strcmp/memcmp
result will return INT_MIN for the "less than zero" case.  While
this is in compliance with the standard, strictly speaking, it
turns out that common applications cannot handle this, e.g. because
they negate a comparison result in order to implement reverse
compares.

This patch changes code to use a different sequence that will result
in -2 for the "less than zero" case (same as GCC).  However, this
requires that the two source operands of the compare instructions
are inverted, which breaks the optimization in removeIPMBasedCompare.
Therefore, I've removed this (and all of optimizeCompareInstr), and
replaced it with a mostly equivalent optimization in combineCCMask
at the DAGcombine level.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353304 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-06 15:10:13 +00:00
Jonas Paulsson
1bf1b6f36e [CodeGenPrepare] Handle all debug calls in dupRetToEnableTailCallOpts()
This patch makes sure that a debug value that is after the bitcast in
dupRetToEnableTailCallOpts() is also skipped.

The reduced test case is from SPEC-2006 on SystemZ.

Review: Vedant Kumar, Wolfgang Pieb
https://reviews.llvm.org/D57050

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352462 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-29 09:03:35 +00:00
Jonas Paulsson
1ca3aae406 [SystemZ] Remember to reset the NoPHIs property on MF in createPHIsForSelects()
After creating new PHI instructions during isel pseudo expansion, the NoPHIs
property of MF should be reset in case it was previously set.

Review: Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352030 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-24 07:54:41 +00:00
Jonas Paulsson
a61ffd3b7e [SystemZ] Fix test case for buildbot.
llvm-clang-x86_64-expensive-checks-win triggered this assert:

"llvm.dbg.value intrinsic requires a !dbg attachment"

Hopefully, adding reasonable !dbg operands solves this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351939 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-23 10:29:12 +00:00
Jonas Paulsson
842b69bf63 [SystemZ] Handle DBG_VALUE instructions in two places in backend.
Two backend optimizations failed to handle cases when compiled with -g, due
to failing to consider DBG_VALUE instructions. This was in
SystemZTargetLowering::emitSelect() and
SystemZElimCompare::getRegReferences().

This patch makes sure that DBG_VALUEs are recognized so that they do not
affect these optimizations.

Tests for branch-on-count, load-and-trap and consecutive selects.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351928 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-23 07:42:26 +00:00
James Y Knight
46d00b498a Remove irrelevant references to legacy git repositories from
compiler identification lines in test-cases.

(Doing so only because it's then easier to search for references which
are actually important and need fixing.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351200 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-15 16:18:52 +00:00
Francis Visoiu Mistrih
08223c34d4 Replace "no-frame-pointer-*" function attributes with "frame-pointer"
Part of the effort to refactoring frame pointer code generation. We used
to use two function attributes "no-frame-pointer-elim" and
"no-frame-pointer-elim-non-leaf" to represent three kinds of frame
pointer usage: (all) frames use frame pointer, (non-leaf) frames use
frame pointer, (none) frame use frame pointer. This CL makes the idea
explicit by using only one enum function attribute "frame-pointer"

Option "-frame-pointer=" replaces "-disable-fp-elim" for tools such as
llc.

"no-frame-pointer-elim" and "no-frame-pointer-elim-non-leaf" are still
supported for easy migration to "frame-pointer".

tests are mostly updated with

// replace command line args ‘-disable-fp-elim=false’ with ‘-frame-pointer=none’
grep -iIrnl '\-disable-fp-elim=false' * | xargs sed -i '' -e "s/-disable-fp-elim=false/-frame-pointer=none/g"

// replace command line args ‘-disable-fp-elim’ with ‘-frame-pointer=all’
grep -iIrnl '\-disable-fp-elim' * | xargs sed -i '' -e "s/-disable-fp-elim/-frame-pointer=all/g"

Patch by Yuanfang Chen (tabloid.adroit)!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351049 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-14 10:55:55 +00:00
Serge Guelton
083a68ec95 Pythran compat - range vs. xrange
Use range instead of xrange whenever possible. The extra list creation in Python2
is generally not a performance bottleneck.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350309 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 14:11:58 +00:00
Serge Guelton
60ccceba74 Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 14:11:33 +00:00
Ulrich Weigand
17177f1518 [SystemZ] Make better use of VLLEZ
This patch fixes two deficiencies in current code that recognizes
the VLLEZ idiom:

- For the floating-point versions, we have ISel patterns that match
  on a bitconvert as the top node.  In more complex cases, that
  bitconvert may already have been merged into something else.
  Fix the patterns to match the inner nodes instead.

- For the 64-bit integer versions, depending on the surrounding code,
  we may get either a DAG tree based on JOIN_DWORDS or one based on
  INSERT_VECTOR_ELT.  Use a PatFrags to simply match both variants.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349749 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 13:05:03 +00:00
Ulrich Weigand
182b5fec21 [SystemZ] Make better use of VGEF/VGEG
Current code in SystemZDAGToDAGISel::tryGather refuses to perform
any transformation if the Load SDNode has more than one use.  This
(erronously) counts uses of the chain result, which prevents the
optimization in many cases unnecessarily.  Fixed by this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 13:01:20 +00:00
Ulrich Weigand
6f90d45552 [SystemZ] Make better use of VLDEB
We already have special code (DAG combine support for FP_ROUND)
to recognize cases where we an use a vector version of VLEDB to
perform two floating-point truncates in parallel, but equivalent
support for VLEDB (vector floating-point extends) has been
missing so far.  This patch adds corresponding DAG combine
support for FP_EXTEND.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349746 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 12:59:05 +00:00
Simon Pilgrim
1fe1ffe00e [TargetLowering] Add ISD::OR + ISD::XOR handling to SimplifyDemandedVectorElts
Differential Revision: https://reviews.llvm.org/D55600

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349264 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 11:36:36 +00:00
Sanjay Patel
74af87e507 [SystemZ] make test immune to scalarization improvements; NFC
The undef operands mean this test is probably still too fragile
to accomplish what the comments suggest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349164 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 17:28:52 +00:00
Jonas Paulsson
d7736b84c4 [SystemZ] Pass copy-hinted regs first from getRegAllocationHints().
When computing register allocation hints for a GRX32Bit register, make sure
that any of the hinted registers that are also copy hints are returned first
in the list.

Review: Ulrich Weigand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349037 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-13 14:37:05 +00:00
Simon Pilgrim
2253059902 [TargetLowering] Add ISD::AND handling to SimplifyDemandedVectorElts
If either of the operand elements are zero then we know the result element is going to be zero (even if the other element is undef).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348926 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 13:43:07 +00:00
Simon Pilgrim
cc069de614 Regenerate knownbits test. NFCI.
A future SimplifyDemandedBits patch will affect this code and I want to ensure the codegen diff is obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348925 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 13:21:03 +00:00
David Green
e744b686ed [Targets] Fixup incorrect targets in codemodel tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348796 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-10 20:55:34 +00:00
David Green
7135d8b482 [Targets] Add errors for tiny and kernel codemodel on targets that don't support them
Adds fatal errors for any target that does not support the Tiny or Kernel
codemodels by rejigging the getEffectiveCodeModel calls.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348585 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-07 12:10:23 +00:00
Sanjay Patel
8f61bb6941 [SystemZ] make test immune to improvements in undef simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347166 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-18 16:50:44 +00:00
Stanislav Mekhanoshin
fbe3eeb333 DAG combiner: fold (select, C, X, undef) -> X
Differential Revision: https://reviews.llvm.org/D54646

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347110 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-16 23:13:38 +00:00
Jonas Paulsson
4cc00e863e [SystemZ] Increase the number of VLREPs
If a loaded value is replicated it is best to combine these two operations
into a VLREP (load and replicate), but isel will not produce this if the load
has other users as well.

This patch handles this by putting the other users of the load to use the
REPLICATE 0-element instead of the load. This way the load has only the
REPLICATE node as user, and we get a VLREP.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346746 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 08:37:09 +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
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
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
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
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
Jonas Paulsson
78f5683a63 [SchedModel] Fix for read advance cycles with implicit pseudo operands.
The SchedModel allows the addition of ReadAdvances to express that certain
operands of the instructions are needed at a later point than the others.

RegAlloc may add pseudo operands that are not part of the instruction
descriptor, and therefore cannot have any read advance entries. This meant
that in some cases the desired read advance was nullified by such a pseudo
operand, which still had the original latency.

This patch fixes this by making sure that such pseudo operands get a zero
latency during DAG construction.

Review: Matthias Braun, Ulrich Weigand.
https://reviews.llvm.org/D49671

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345606 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 15:04:40 +00:00
Matthias Braun
8f7dc5cb4e Relax fast register allocator related test cases; NFC
- Relex hard coded registers and stack frame sizes
- Some test cleanups
- Change phi-dbg.ll to match on mir output after phi elimination instead
  of going through the whole codegen pipeline.

This is in preparation for https://reviews.llvm.org/D52010
I'm committing all the test changes upfront that work before and after
independently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345532 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-29 20:10:42 +00:00
Simon Pilgrim
5bdc0dc591 Regenerate FP_TO_INT tests.
Precursor to fix for PR17686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345453 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-27 15:00:38 +00:00
Jonas Paulsson
9067288adc [SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().
In order to print the IR slot number for the memory operand, the DAG pointer
must be passed to SDNode::dump().

The isel-debug.ll test updated to also check for the IR Value reference being
printed correctly.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345347 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-26 00:02:33 +00:00
Jonas Paulsson
b829dc3549 Fix in MachineOperand::printIRValueReference().
Handle the case where getCurrentFunction() returns nullptr by passing -1 to
printIRSlotNumber(). This will result in <badref> being printed instead of an
assertion failure.

Review: Francis Visoiu Mistrih
https://reviews.llvm.org/D53333

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345342 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 23:39:07 +00:00
Thomas Lively
bbc2ea9b21 [NFC] Rename minnan and maxnan to minimum and maximum
Summary:
Changes all uses of minnan/maxnan to minimum/maximum
globally. These names emphasize that the semantic difference between
these operations is more than just NaN-propagation.

Reviewers: arsenm, aheejin, dschuff, javed.absar

Subscribers: jholewinski, sdardis, wdng, sbc100, jgravelle-google, jrtc27, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345218 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 22:49:55 +00:00
Nirav Dave
df002d74e3 [DAGCombine] Improve Load-Store Forwarding
Summary:
Extend analysis forwarding loads from preceeding stores to work with
extended loads and truncated stores to the same address so long as the
load is fully subsumed by the store.

Hexagon's swp-epilog-phis.ll and swp-memrefs-epilog1.ll test are
deleted as they've no longer seem to be relevant.

Reviewers: RKSimon, rnk, kparzysz, javed.absar

Subscribers: sdardis, nemanjai, hiraditya, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344142 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-10 14:15:52 +00:00
Simon Pilgrim
91bff92aa5 [DAGCombiner] Add X / X -> 1 & X % X -> 0 folds (test tweaks)
Adjust tests to avoid the X / X -> 1 & X % X -> 0 folds while keeping their original purposes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340916 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 11:18:14 +00:00
Kit Barton
d7e8f44ac5 [PPC] Remove Darwin support from POWER backend.
This patch issues an error message if Darwin ABI is attempted with the PPC
backend. It also cleans up existing test cases, either converting the test to
use an alternative triple or removing the test if the coverage is no longer
needed.

Updated Tests
-------------
The majority of test cases were updated to use a different triple that does not
include the Darwin ABI. Many tests were also updated to use FileCheck, in place
of grep.

Deleted Tests
-------------
llvm/test/tools/dsymutil/PowerPC/sibling.test was originally added to test
specific functionality of dsymutil using an object file created with an old
version of llvm-gcc for a Powerbook G4. After a discussion with @JDevlieghere he
suggested removing the test.

llvm/test/CodeGen/PowerPC/combine_loads_from_build_pair.ll was converted from a
PPC test to a SystemZ test, as the behavior is also reproducible there.

All other tests that were deleted were specific to the darwin/ppc ABI and no
longer necessary.

Phabricator Review: https://reviews.llvm.org/D50988

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340795 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 01:18:29 +00:00
Krzysztof Parzyszek
3682387e68 [RegisterCoalscer] Manually remove leftover segments when commuting def
In removeCopyByCommutingDef, segments from the source live range are
copied into (and merged with) the segments of the target live range.
This is performed for all subranges of the source interval. It can
happen that there will be subranges of the target interval that had
no corresponding subranges in the source interval, and in such cases
these subrages will not be updated. Since the copy being coalesced
is about to be removed, these ranges need to be updated by removing
the segments that are started by the copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340318 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 19:01:26 +00:00
Krzysztof Parzyszek
d020e74d68 [SystemZ] Require asserts in subregliveness-06.mir
The option -misched=shuffle is only available with !NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339931 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 20:12:15 +00:00
Krzysztof Parzyszek
5ede58d7d7 [MachineVerifier] Check if predecessor is jointly dominated by undefs
Each use of a value should be jointly dominated by the union of defs and
undefs. It can happen that it will only be jointly dominated by undefs,
and that is still legal. Make sure that the verifier is aware of that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339924 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 19:13:28 +00:00
Krzysztof Parzyszek
d9c9d82716 [RegisterCoalescer] Shrink to uses if needed after removeCopyByCommutingDef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339912 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-16 18:02:59 +00:00
Krzysztof Parzyszek
0d5de60cbe [RegisterCoalescer] Ensure that both registers have subranges if one does
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339792 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 17:04:58 +00:00
Krzysztof Parzyszek
28f0c7ef0a [RegisterCoalescer] Reset VNInfo def when copying segments over
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339788 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 16:21:53 +00:00
Krzysztof Parzyszek
d7a0236f29 [RegAlloc] Check that subreg liveness tracking applies to given virtual reg
Subregister liveness applies selectively to register classes with certain
properties. Make sure that when it's enabled, it applies to a given virtual
register (in virtual register rewriter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339784 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 16:07:47 +00:00
Krzysztof Parzyszek
165c0cc485 [SystemZ] Add testcase for r339778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339780 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-15 15:43:13 +00:00