Commit Graph

43530 Commits

Author SHA1 Message Date
Oliver Stannard
4e5ac8a9a2 [ValueTracking] Out of range shifts might be undef
If it is possible for the RHS of a shift operation to be greater than or equal
to the bit-width, then the result might be undef, and we can't report any known
bits.

In some cases, this was allowing a transformation in instcombine which widened
an undef value from i1 to i32, increasing the range of values that a function
could return.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297724 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 10:13:17 +00:00
Sam Parker
53c73db7b9 [ARM] Move SMULW[B|T] isel to DAG Combine
Create nodes for smulwb and smulwt and move their selection from
DAGToDAG to DAG combine. smlawb and smlawt can then be selected
using tablegen. Added some helper functions to detect shift patterns
as well as a wrapper around SimplifyDemandBits. Added a couple of
extra tests.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297716 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 09:13:22 +00:00
Oren Ben Simhon
6095a7948d Disable Callee Saved Registers
Each Calling convention (CC) defines a static list of registers that should be preserved by a callee function. All other registers should be saved by the caller.
Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list.
The current LLVM implementation doesn’t support it. It will save a register if it is part of the static CSR list and will not care if the register is passed/returned by the callee.
The solution is to dynamically allocate the CSR lists (Only for these CCs). The lists will be updated with actual registers that should be saved by the callee.
Since we need the allocated lists to live as long as the function exists, the list should reside inside the Machine Register Info (MRI) which is a property of the Machine Function and managed by it (and has the same life span).
The lists should be saved in the MRI and populated upon LowerCall and LowerFormalArguments.
The patch will also assist to implement future no_caller_saved_regsiters attribute intended for interrupt handler CC.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297715 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 09:09:26 +00:00
Craig Topper
89cd317805 [AVX-512] Use iPTR instead of i64 in patterns for extract_subvector/insert_subvector index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 06:40:04 +00:00
Craig Topper
d0ed9de333 [AVX-512] Add test cases that demonstrate some patterns that don't work correctly in 32-bit mode. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297706 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 06:40:00 +00:00
Jonas Paulsson
85dd82a95b [TargetTransformInfo] getIntrinsicInstrCost() scalarization estimation improved
getIntrinsicInstrCost() used to only compute scalarization cost based on types.
This patch improves this so that the actual arguments are checked when they are
available, in order to handle only unique non-constant operands.

Tests updates:

Analysis/CostModel/X86/arith-fp.ll
Transforms/LoopVectorize/AArch64/interleaved_cost.ll
Transforms/LoopVectorize/ARM/interleaved_cost.ll

The improvement in getOperandsScalarizationOverhead() to differentiate on
constants made it necessary to update the interleaved_cost.ll tests even
though they do not relate to intrinsics.

Review: Hal Finkel
https://reviews.llvm.org/D29540

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297705 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 06:35:36 +00:00
Daniel Berlin
3789b6187c Add missing condprop-xfail.ll that contains the remaining xfail'd tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 01:46:51 +00:00
Nirav Dave
5fc240a5b6 Recommitting Craig Topper's patch now that r296476 has been recommitted.
When checking if chain node is foldable, make sure the intermediate nodes have a single use across all results not just the result that was used to reach the chain node.

This recovers a test case that was severely broken by r296476, my making sure we don't create ADD/ADC that loads and stores when there is also a flag dependency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297698 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 01:42:23 +00:00
Nirav Dave
3bbf394145 In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled.
Recommiting with compiler time improvements

    Recommitting after fixup of 32-bit aliasing sign offset bug in DAGCombiner.

    * Simplify Consecutive Merge Store Candidate Search

    Now that address aliasing is much less conservative, push through
    simplified store merging search and chain alias analysis which only
    checks for parallel stores through the chain subgraph. This is cleaner
    as the separation of non-interfering loads/stores from the
    store-merging logic.

    When merging stores search up the chain through a single load, and
    finds all possible stores by looking down from through a load and a
    TokenFactor to all stores visited.

    This improves the quality of the output SelectionDAG and the output
    Codegen (save perhaps for some ARM cases where we correctly constructs
    wider loads, but then promotes them to float operations which appear
    but requires more expensive constant generation).

    Some minor peephole optimizations to deal with improved SubDAG shapes (listed below)

    Additional Minor Changes:

      1. Finishes removing unused AliasLoad code

      2. Unifies the chain aggregation in the merged stores across code
         paths

      3. Re-add the Store node to the worklist after calling
         SimplifyDemandedBits.

      4. Increase GatherAllAliasesMaxDepth from 6 to 18. That number is
         arbitrary, but seems sufficient to not cause regressions in
         tests.

      5. Remove Chain dependencies of Memory operations on CopyfromReg
         nodes as these are captured by data dependence

      6. Forward loads-store values through tokenfactors containing
          {CopyToReg,CopyFromReg} Values.

      7. Peephole to convert buildvector of extract_vector_elt to
         extract_subvector if possible (see
         CodeGen/AArch64/store-merge.ll)

      8. Store merging for the ARM target is restricted to 32-bit as
         some in some contexts invalid 64-bit operations are being
         generated. This can be removed once appropriate checks are
         added.

    This finishes the change Matt Arsenault started in r246307 and
    jyknight's original patch.

    Many tests required some changes as memory operations are now
    reorderable, improving load-store forwarding. One test in
    particular is worth noting:

      CodeGen/PowerPC/ppc64-align-long-double.ll - Improved load-store
      forwarding converts a load-store pair into a parallel store and
      a memory-realized bitcast of the same value. However, because we
      lose the sharing of the explicit and implicit store values we
      must create another local store. A similar transformation
      happens before SelectionDAG as well.

    Reviewers: arsenm, hfinkel, tstellarAMD, jyknight, nhaehnle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297695 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 00:34:14 +00:00
Adrian Prantl
8c12617ac6 Revert "Debug Info: Add basic support for external types references."
This reverts commit r242302. External type refs of this form were
never used by any LLVM frontend so this is effectively dead code.
(They were introduced to support clang module debug info, but in the
end we came up with a better design that doesn't use this feature at
all.)

rdar://problem/25897929

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297684 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 22:56:14 +00:00
Daniel Berlin
f3ed5aafdd NewGVN: We pass rle-nonlocal, we just perform the replacement in a way that keeps the old name instead of the new one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297683 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 22:43:30 +00:00
Artyom Skrobov
7a06df3cf9 [Thumb1] combine ADDC/SUBC with a negative immediate
Summary: This simple optimization has been split out of https://reviews.llvm.org/D30400

Reviewers: efriedma, jmolloy

Subscribers: llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297682 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 22:36:14 +00:00
Craig Topper
85ad85b52e [AVX-512] Fix another case where we are copying from a mask register using AH/BH/CH/DH with fastisel.
Fixes PR32256. Still planning to do an audit for other possible cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297678 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 21:58:54 +00:00
Volkan Keles
43373e2ad8 GlobalISel: Translate ConstantDataVector
Reviewers: qcolombet, aditya_nandakumar, dsanders, t.p.northover, javed.absar, ab

Reviewed By: qcolombet, dsanders, ab

Subscribers: dberris, rovka, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297670 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 21:36:19 +00:00
Tim Northover
d0188c3d44 Revert "GlobalISel: move vector extract/insert inside generic opcode region."
I was writing against an earlier branch and Volkan had already fixed this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297668 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 21:25:10 +00:00
Simon Pilgrim
8879a17087 [X86][MMX] Fix folding of shift value loads to cover whole 64-bits
rL230225 made the assumption that only the lower 32-bits of an MMX register load is used as a shift value, when in fact the whole 64-bits are reloaded and treated as a i64 to determine the shift value.

This patch reverts rL230225 to ensure that the whole 64-bits of memory are folded and ensures that the upper 32-bit are zero'd for cases where the shift value has come from a scalar source.

Found during fuzz testing.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297667 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 21:23:29 +00:00
Tim Northover
6ac2f2bb7f GlobalISel: move vector extract/insert inside generic opcode region.
Otherwise they won't be legalized or selected, causing instruction selection to
fail horribly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297666 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 21:18:59 +00:00
Andrew Kaylor
4ae8ddf57b Revert r295004 (Add MXCSR) due to errors reported by MachineVerifier
I am leaving the code in clang which filters mxcsr from the clobber list because that is still technically correct and will be useful again when the MXCSR register is reintroduced.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297664 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 20:35:10 +00:00
Rafael Espindola
37e8db6fe5 Bring back r297624.
The issues was just a missing REQUIRES in the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297661 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 20:00:25 +00:00
Sanjay Patel
33896dc120 [SimplifyCFG] move tests for PR31028 from CGP
Hopefully, this will make sense with a forthcoming patch. If not, we can move these back.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297660 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 19:59:14 +00:00
Matt Arsenault
32cb946c46 AMDGPU: Treat 0 as private null pointer in addrspacecast lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297658 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 19:47:31 +00:00
Rafael Espindola
5682e3ee66 Revert "Fix crash when multiple raw_fd_ostreams to stdout are created."
This reverts commit r297624.
It was failing on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297657 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 19:38:32 +00:00
Jessica Paquette
af024ba867 [Outliner] Add tail call support
This commit adds tail call support to the MachineOutliner pass. This allows
the outliner to insert jumps rather than calls in areas where tail calling is
possible. Outlined tail calls include the return or terminator of the basic
block being outlined from.

Tail call support allows the outliner to take returns and terminators into
consideration while finding candidates to outline. It also allows the outliner
to save more instructions. For example, in the X86-64 outliner, a tail called
outlined function saves one instruction since no return has to be inserted.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297653 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 18:39:33 +00:00
Craig Topper
57255ff3b4 [X86] Lower AVX2 gather intrinsics similar to AVX-512. Apply the same input source optimizations to break execution dependencies.
For AVX-512 we force the input to zero if the input is undef or the mask is all ones to break an execution dependency. This patch brings the same behavior to AVX2.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297652 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 18:34:46 +00:00
Craig Topper
131341ea2e [AVX-512] If gather mask is all ones, force the input to a zero vector.
We were already forcing undef inputs to become a zero vector, this now catches an all ones mask too.

Ideally we'd use undef and let execution dep fix handle picking the best register/clearance for the undef, but I don't think it can handle the early clobber today.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 18:17:46 +00:00
Matt Arsenault
8187a9b9ca AMDGPU: Fold icmp/fcmp into icmp intrinsic
The typical use is a library vote function which
compares to 0. Fold the user condition into the intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297650 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 18:14:02 +00:00
Jonas Devlieghere
2ebca363ad [Linker] Provide callback for internalization
Differential Revision: https://reviews.llvm.org/D30738

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297649 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 18:08:11 +00:00
Sanjay Patel
498a13fdd1 [CGP] add tests for PR31028; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297629 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 15:45:37 +00:00
Rafael Espindola
b8ff3dcbf6 Fix crash when multiple raw_fd_ostreams to stdout are created.
If raw_fd_ostream is constructed with the path of "-", it claims
ownership of the stdout file descriptor. This means that it closes
stdout when it is destroyed. If there are multiple users of
raw_fd_ostream wrapped around stdout, then a crash can occur because
of operations on a closed stream.

An example of this would be running something like "clang -S -o - -MD
-MF - test.cpp". Alternatively, using outs() (which creates a local
version of raw_fd_stream to stdout) anywhere combined with such a
stream usage would cause the crash.

The fix duplicates the stdout file descriptor when used within
raw_fd_ostream, so that only that particular descriptor is closed when
the stream is destroyed.

Patch by James Henderson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297624 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 14:45:06 +00:00
Diana Picus
9ce81e13ed [ARM] GlobalISel: Support SP in regbankselect
We used to hit an unreachable in getRegBankFromRegClass when dealing with the
stack pointer. This commit adds support for the GPRsp reg class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 14:28:34 +00:00
Craig Topper
04b36a711b [AVX-512] Add EVEX2VEX test cases for the cvt instructions fixed in r297599 and r297600.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297603 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:47:56 +00:00
Craig Topper
760a31890d Revert "[AVX-512] EVEX2VEX, don't reject intrinsic instructions when both have a memory operand. We should just continue to check other operands instead."
This reverts r297596.

There were other issues that were making this not work that have been fixed now. Reverting this results in a more accurate table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 05:34:03 +00:00
Craig Topper
c68171ad8f [AVX-512] EVEX2VEX, don't reject intrinsic instructions when both have a memory operand. We should just continue to check other operands instead.
This exposed that we have several intrinsic instructions that have identical TSFlags to other instructions. We should merge their patterns and kill of the duplicate. I'll fix that in a follow up patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297596 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 00:36:49 +00:00
Craig Topper
acde888274 [AVX-512] Fix the valid immediates for the scatter/gather prefetch intrinsics.
The immediate should be 1 or 2, not 0 or 1. This was found while adding bounds checking to clang. In fact the existing clang builtin test failed if we ran it all the way to assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297591 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 22:29:12 +00:00
Sanjay Patel
cc9614d291 [x86] don't blindly transform SETB into SBB
I noticed unnecessary 'sbb' instructions in D30472 and while looking at 'ptest' codegen recently. 
This happens because we were transforming any 'setb' - even when we only wanted a single-bit result.

This patch moves those transforms under visitAdd/visitSub, so we we're only creating sbb/adc when it
is a win. I don't know why we need a SETCC_CARRY node type, but I'm not proposing to change that
existing behavior in this patch.

Also, I'm skeptical that sbb/adc are a win for all micro-arches, so I added comments to the test files
where this transform still fires.

The test changes here are all cases where we no longer produce sbb/adc. Avoiding partial register
stalls (generating an xor to clear a register) is not handled in some cases, but that's a separate
issue.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 18:28:48 +00:00
Azharuddin Mohammed
beaedd7463 Remove CRC32 instructions from AArch64InstrInfo::hasShiftedReg
Summary:
A53 scheduler causes an assertion failure on all CRC instructions:
include/llvm/CodeGen/MachineInstr.h:280: const llvm::MachineOperand
&llvm::MachineInstr::getOperand(unsigned int) const: Assertion `i <
getNumOperands() && "getOperand() out of range!"' failed.

The case statements corresponding to CRC instructions are incorrect and should
be removed.

Also adding a testcase while on this.

Reviewers: t.p.northover, javed.absar, apazos, rengolin

Reviewed By: rengolin

Subscribers: evandro, aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 14:02:32 +00:00
Igor Breger
fbb692e572 [X86] Add vector zext tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 13:20:10 +00:00
Craig Topper
2e124a6c7c [AVX-512] Fix a bad use of a high GR8 register after copying from a mask register during fast isel. This ends up extracting from bits 15:8 instead of the lower bits of the mask.
I'm pretty sure there are more problems lurking here. But I think this fixes PR32241.

I've added the test case from that bug and added asserts that will fail if we ever try to copy between high registers and mask registers again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 03:37:37 +00:00
Craig Topper
a168e94d13 [AVX-512] Add test case for PR32241. Fix coming in another commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-12 03:37:34 +00:00
Simon Pilgrim
c856889d16 [X86][SSE] Improve extraction of elements from v16i8 (pre-SSE41)
Without SSE41 (pextrb) we currently extract byte elements from a vector by spilling to stack and reloading the byte.

This patch is an initial attempt at using MOVD/PEXTRW to extract the relevant DWORD/WORD from the vector and then shift+truncate to collect the correct byte.

Extraction of multiple bytes this way would result in code bloat, but as explained in the patch we could probably afford to be more aggressive with the supported extractions before again falling back on spilling - possibly through counting the number of extracts and which DWORD/WORD they originate?

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 20:42:31 +00:00
Craig Topper
39936dcadb [X86] Add avx2 gather tests cases that show a failure to remove zeroing of the source when the mask is all ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 18:26:00 +00:00
Matt Arsenault
a8ffe4b37c AMDGPU: Remove packf16 intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:51:16 +00:00
Matt Arsenault
dbe625a311 AMDGPU: Keep track of modifiers when converting v_mac to v_mad
Since v_max_f32_e64/v_max_f16_e64 can be folded if the target
instruction supports the clamp bit, we also need to maintain
modifiers when converting v_mac to v_mad.

This fixes a rendering issue with Dirt Rally because a v_mac
instruction with the clamp bit set was converted to a v_mad
but that bit was lost during the conversion.

Fixes: e184e01dd7 ("AMDGPU: Fold FP clamp as modifier bit")

Patch by Samuel Pitoiset <samuel.pitoiset@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:40:40 +00:00
Sanjoy Das
c32a57361b Use a WeakVH for UnknownInstructions in AliasSetTracker
Summary:
This change solves the same problem as D30726, except that this only
throws out the bathwater.

AST was not correctly tracking and deleting UnknownInstructions via
handles.  The existing code only tracks "pointers" in its
`ASTCallbackVH`, so an UnknownInstruction (that isn't also def'ing a
pointer used by another memory instruction) never gets a
`ASTCallbackVH`.

There are two other ways to solve this problem:

 - Use the `PointerRec` scheme for both known and unknown instructions.
 - Use a `CallbackVH` that erases the offending Instruction from the
   UnknownInstruction list.

Both of the above changes seemed to be significantly (and unnecessarily
IMO) more complex than this.

Reviewers: chandlerc, dberlin, hfinkel, reames

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297539 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 01:15:48 +00:00
Stanislav Mekhanoshin
3081264dbe [AMDGPU] Remove getBidirectionalReasonRank
This method inverts the Reason field of a scheduling candidate.
It does right comparison between RegCritical and RegExcess, but
everything else is broken. In fact it can prefer less strong reason
such as Weak over RegCritical because Weak > -RegCritical.

The CandReason enum is properly sorted, so just remove artificial
ranking.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 00:29:27 +00:00
Krzysztof Parzyszek
2f2421b3c0 [RDF] Remove the map of reaching defs from copy propagation
Use Liveness::getNearestAliasedRef to find the reaching def instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297526 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 22:44:24 +00:00
Simon Pilgrim
5b42c82e6a [X86][SSE] Fix load folding for (V)CVTDQ2PD
This only requires a 64-bit memory source, not the whole 128-bits. But the 128-bit case is still supported via X86InstrInfo::foldMemoryOperandImpl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297523 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 22:35:07 +00:00
Simon Pilgrim
be5b44e27d [X86][RTM] Regenerate RTM intrinsic tests for 32/64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297518 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 21:55:24 +00:00
Peter Collingbourne
a58d2a9027 LTO: Hash type identifier resolutions for WholeProgramDevirt.
Differential Revision: https://reviews.llvm.org/D30555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297514 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 21:37:10 +00:00
Peter Collingbourne
a354228e67 LTO: Hash type identifier resolutions for LowerTypeTests.
Differential Revision: https://reviews.llvm.org/D30553

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297513 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 21:35:17 +00:00