Commit Graph

21855 Commits

Author SHA1 Message Date
Krzysztof Parzyszek c6a42e96ed [Hexagon] Convert HVX vector constants of i1 to i8
Certain operations require vector of i1 values. However, for Hexagon
architecture compatibility, they need to be represented as vector of i8.

Patch by Suyog Sarda.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309677 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01 13:12:53 +00:00
Simon Pilgrim 1b7afc891a [X86] Regenerate big structure return test and check on x86_64 as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309676 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01 13:12:15 +00:00
Tom Stellard c0ce68eb67 AMDGPU/GlobalISel: Add support for amdgpu_vs calling convention
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309675 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01 12:38:33 +00:00
Andrew V. Tischenko 052dd78cb3 Support itineraries in TargetSubtargetInfo::getSchedInfoStr - Now if the given instr does not have sched model then we try to calculate the latecy/throughput with help of itineraries.
Differential Revision https://reviews.llvm.org/D35997


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309666 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01 09:15:43 +00:00
Eli Friedman 68720204a7 [ScheduleDAG] Don't schedule node with physical register interference
https://reviews.llvm.org/D31536 didn't really solve the problem it was
trying to solve; it got rid of the assertion failure, but we were still
scheduling the DAG incorrectly (mixing together instructions from
different calls), leading to a MachineVerifier failure.

In order to schedule the DAG correctly, we have to make sure we don't
schedule a node which should be blocked by an interference. Fix
ScheduleDAGRRList::PickNodeToScheduleBottomUp so it doesn't pick a node
like that.

The added call to FindAvailableNode() is the key change here; this makes
sure we don't try to schedule a call while we're in the middle of
scheduling a different call. I'm not sure this is the right approach; in
particular, I'm not sure how to prove we don't end up with an infinite
loop of repeatedly backtracking.

This also reverts the code change from D31536. It doesn't do anything
useful: we should never schedule an ADJCALLSTACKDOWN unless we've
already scheduled the corresponding ADJCALLSTACKUP.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309642 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01 00:28:40 +00:00
Craig Topper c28b6e3216 [AVX-512] Add unmasked subvector inserts and extract to the execution domain tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 22:07:29 +00:00
Craig Topper 5f3a835eaf [AVX512] Add a common prefix to avx512-insert-extract.ll so we can reduce the number of check lines on some test cases.
This was pointed out during the review for D313804.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309629 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 21:20:06 +00:00
Craig Topper 71201a4208 [AVX-512] Use AVX512 as test check prefix instead of AVX3. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309625 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 20:58:06 +00:00
Konstantin Belochapka de4ee6c474 [X86][MMX] Added custom lowering action for MMX SELECT (PR30418)
Fix for pr30418 - error in backend: Cannot select: t17: x86mmx = select_cc t2, Constant:i64<0>, t7, t8, seteq:ch
Differential Revision: https://reviews.llvm.org/D34661





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 20:11:49 +00:00
Quentin Colombet 6131fb56ca [TargetPassConfig] Feature generic options to setup start/stop-after/before
This patch refactors the code used in llc such that all the users of the
addPassesToEmitFile API have access to a homogeneous way of handling
start/stop-after/before options right out of the box.

In particular, just invoking addPassesToEmitFile will set the proper
pipeline without additional effort (modulo parsing a .mir file if the
start-before/after options are used.

NFC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309599 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 18:24:07 +00:00
Sanjay Patel 8209d78723 [CGP] use subtract or subtract-of-cmps for result of memcmp expansion
As noted in the code comment, transforming this in the other direction might require 
a separate transform here in CGP given the block-at-a-time DAG constraint.

Besides that theoretical motivation, there are 2 practical motivations for the 
subtract-of-cmps form:

1. The codegen for both x86 and PPC is better for this IR (though PPC could be better still). 
   There is discussion about canonicalizing IR to the select form 
   ( http://lists.llvm.org/pipermail/llvm-dev/2017-July/114885.html ), 
   so we probably need to add DAG transforms for those patterns anyway, but this improves the 
   memcmp output without waiting for that step.

2. If we allow vector-sized chunks for the load and compare, x86 is better prepared to convert
   that to optimal code when using subtract-of-cmps, so another prerequisite patch is avoided
   if we choose to enable that.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309597 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 18:08:24 +00:00
Craig Topper af156f2d96 [AVX-512] Remove patterns that select vmovdqu8/16 for unmasked loads. Prefer vmovdqa64/vmovdqu64 instead.
These were taking priority over the aligned load instructions since there is no vmovda8/16. I don't think there is really a difference between aligned and unaligned on newer cpus so I don't think it matters which instructions we use.

But with this change we reduce the size of the isel table a little and we allow the aligned information to pass through to the evex->vec pass and produce the same output has avx/avx2 in some cases.

I also generally dislike patterns rooted in a bitcast which these were.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309589 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 17:35:44 +00:00
Aditya Nandakumar d98de6bf35 [GISel]: Support Widening G_ICMP's destination operand.
Updated AArch64 to widen destination to s32.
https://reviews.llvm.org/D35737

Reviewed by Tim

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309579 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 17:00:16 +00:00
Simon Pilgrim 0bc57f232f [X86] Extending a test cases for LEA factorization.
Submitted on the behalf of Jatin Bhateja

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309565 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 14:23:28 +00:00
Simon Dardis 8154453cfb [SelectionDAG][mips] Fix PR33883
PR33883 shows that calls to intrinsic functions should not have their vector
arguments or returns subject to ABI changes required by the target.

This resolves PR33883.

Thanks to Alex Crichton for reporting the issue!

Reviewers: zoran.jovanovic, atanasyan

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309561 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 14:06:58 +00:00
Guy Blank e9ee33645e [X86][AVX512] Add masked MOVS[S|D] patterns
Added patterns to recognize AND 1 on the mask of a scalar masked
move is not needed since only the lower bit is relevant for the
instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 08:26:14 +00:00
Craig Topper 0b9e47c36d [X86] Add pattern to use bzhi for 64-bit 'and' with a mask when there is a load involved.
We already had a pattern without load, but with a load we were falling back to a regular 'and' due to pattern complexity priority.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309535 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31 05:55:54 +00:00
Michael Zuckerman 61a909a34f Expanding the test case for vf8 for stride 4 interleaved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309511 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-30 11:54:57 +00:00
Florian Hahn cfed1ba7aa [AArch64] Tie source and destination operands for AESMC/AESIMC.
Summary:
Most CPUs implementing AES fusion require instruction pairs of the form
    AESE Vn, _
    AESMC Vn, Vn
and
    AESD Vn, _
    AESIMC Vn, Vn

The constraint is added to AES(I)MC instructions which use the result of
an AES(E|D) instruction by using AES(I)MCTrr pseudo instructions, which
constraint source and destination registers to be the same.

A nice side effect of this change is that now all possible pairs are
scheduled back-to-back on the exynos-m1 for the misched-fusion-aes.ll
test case.

I had to update aes_load_store. The version I added initially was very
reduced and with the new constraint, AESE/AESMC could not be scheduled
back-to-back. I updated the test to be more realistic and still expose
the same scheduling problem as the initial test case.

Reviewers: t.p.northover, rengolin, evandro, kristof.beyls, silviu.baranga

Reviewed By: t.p.northover, evandro

Subscribers: aemerson, javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309495 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 20:35:28 +00:00
Florian Hahn b7c4c52105 [AArch64] Use 8 bytes as preferred function alignment on Cortex-A53.
Summary:
This change gives a 0.25% speedup on execution time, a 0.82% improvement
in benchmark scores and a 0.20% increase in binary size on a Cortex-A53.
These numbers are the geomean results on a wide range of benchmarks from
the test-suite and a range of proprietary suites.

Reviewers: t.p.northover, aadg, silviu.baranga, mcrosier, rengolin

Reviewed By: rengolin

Subscribers: grimar, davide, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309494 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 20:04:54 +00:00
Simon Pilgrim e4f6153167 [SelectionDAG][X86] CombineBT - more aggressively determine demanded bits
This patch is in 2 parts:

1 - replace combineBT's use of SimplifyDemandedBits (hasOneUse only) with SelectionDAG::GetDemandedBits to more aggressively determine the lower bits used by BT.

2 - update SelectionDAG::GetDemandedBits to support ANY_EXTEND - if the demanded bits are only in the non-extended portion, then peek through and demand from the source value and then ANY_EXTEND that if we found a match.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309486 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 14:50:25 +00:00
Matt Arsenault 1ab1e79a01 AMDGPU: Make areMemAccessesTriviallyDisjoint more aware of segment flat
Checking the encoding is insufficient since now there can
be global or scratch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 01:26:21 +00:00
Matt Arsenault 27eee9a0e2 AMDGPU: Teach isLegalAddressingMode about global_* instructions
Also refine the flat check to respect flat-for-global feature,
and constant fallback should check global handling, not
specifically MUBUF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309471 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 01:12:31 +00:00
Matt Arsenault d74d012b62 AMDGPU: Start selecting global instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309470 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 01:03:53 +00:00
Farhana Aleen 3912b267e3 Added tests for i8 interleaved-load-pattern of stride=4, VF=(8, 16, 32).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309447 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 22:43:34 +00:00
Adrian Prantl 5d0334a48c Remove the obsolete offset parameter from @llvm.dbg.value
There is no situation where this rarely-used argument cannot be
substituted with a DIExpression and removing it allows us to simplify
the DWARF backend. Note that this patch does not yet remove any of
the newly dead code.

rdar://problem/33580047
Differential Revision: https://reviews.llvm.org/D35951

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309426 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 20:21:02 +00:00
Reid Kleckner 71a1ea82c0 Fix conditional tail call branch folding when both edges are the same
The conditional tail call logic did the wrong thing when both
destinations of a conditional branch were the same:

BB#1: derived from LLVM BB %entry
    Live Ins: %EFLAGS
    Predecessors according to CFG: BB#0
        JE_1 <BB#5>, %EFLAGS<imp-use,kill>
        JMP_1 <BB#5>

BB#5: derived from LLVM BB %sw.epilog
    Predecessors according to CFG: BB#1
        TCRETURNdi64 <ga:@mergeable_conditional_tailcall>, 0, ...

We would fold the JE_1 to a TCRETURNdi64cc, and then remove our BB#5
successor. Then BB#5 would be deleted as it had no predecessors, leaving
a dangling "JMP_1 <BB#5>" reference behind to cause assertions later.

This patch checks that both conditional branch destinations are
different before doing the transform. The standard branch folding logic
is able to remove both the JMP_1 and the JE_1, and for my test case we
end up forming a better conditional tail call later.

Fixes PR33980

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 19:48:40 +00:00
Matt Arsenault 69aaec6591 AMDGPU: Look through a bitcast user of an out argument
This allows handling of a lot more of the interesting
cases in Blender. Most of the large functions unlikely
to be inlined have this pattern.

This is a special case for what clang emits for OpenCL 3
element vectors. Annoyingly, these are emitted as
<3 x elt>* pointers, but accessed as <4 x elt>* operations.
This also needs to handle cases where a struct containing
a single vector is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309419 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 19:06:16 +00:00
Matt Arsenault acac0ef9e7 AMDGPU: Add pass to replace out arguments
It is better to return arguments directly in registers
if we are making a call rather than introducing expensive
stack usage. In one of sample compile from one of
Blender's many kernel variants, this fires on about
~20 different functions. Future improvements may be to
recognize simple cases where the pointer is indexing a small
array. This also fails when the store to the out argument
is in a separate block from the return, which happens in
a few of the Blender functions. This should also probably
be using MemorySSA which might help with that.

I'm not sure this is correct as a FunctionPass, but
MemoryDependenceAnalysis seems to not work with
a ModulePass.

I'm also not sure where it should run.I think it should
run  before DeadArgumentElimination, so maybe either
EP_CGSCCOptimizerLate or EP_ScalarOptimizerLate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309416 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 18:40:05 +00:00
Tim Northover 079481adb8 GlobalISel: map 128-bit values to an FPR by default.
Eventually we may want to allow a pair of GPRs but absolutely nothing in the
entire world is ready for that yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309404 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 17:11:01 +00:00
Matt Arsenault dbe42be969 AMDGPU: Annotate implicitarg.ptr usage
We need to pass something to functions for this to work.
It isn't derivable just from the kernarg segment pointer
because the implicit arguments are placed after the
kernel arguments.

Also fixes missing test for the intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309398 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 15:52:08 +00:00
Strahinja Petrovic b779d34597 [ARM] Add the option to directly access TLS pointer
This patch enables choice for accessing thread local
storage pointer (like '-mtp' in gcc).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309381 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 12:54:57 +00:00
Simon Pilgrim 5b0d461d42 [X86] Add test case for PR33290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309375 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 09:43:52 +00:00
Simon Pilgrim 552bd4c888 [X86][AVX] Cleanup shuffle combine tests - remove old prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 09:41:55 +00:00
Peter Smith 920a5bacca [ARM] Add test to check pcs of ARM ABI runtime floating point helpers
The ARM Runtime ABI document (IHI0043) defines the AEABI floating point
helper functions in section 4.1.2 The floating-point helper functions.
The functions listed in this section must always use the base AAPCS calling
convention.

This test generates calls to all the helper functions that llvm supports
and checks that the base AAPCS calling convention has been used. We test
the equivalent of -mfloat-abi=soft, -mfloat-abi=softfp, -mfloat-abi=hardfp
with an FPU that supports single and double precision, and one that only
supports double precision.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309371 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 09:21:00 +00:00
Matthias Braun bbad0fa6a9 ARMFrameLowering: Only set ExtraCSSpill for actually unused registers.
The code assumed that unclobbered/unspilled callee saved registers are
unused in the function. This is not true for callee saved registers that are
also used to pass parameters such as swiftself.

rdar://33401922

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309350 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 01:36:32 +00:00
Reid Kleckner 7cc7cad98c [X86] Fix latent bug in sibcall eligibility logic
The X86 tail call eligibility logic was correct when it was written, but
the addition of inalloca and argument copy elision broke its
assumptions. It was assuming that fixed stack objects were immutable.

Currently, we aim to emit a tail call if no arguments have to be
re-arranged in memory. This code would trace the outgoing argument
values back to check if they are loads from an incoming stack object.
If the stack argument is immutable, then we won't need to store it back
to the stack when we tail call.

Fortunately, stack objects track their mutability, so we can just make
the obvious check to fix the bug.

This was http://crbug.com/749826

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 00:58:35 +00:00
Ahmed Bougacha 9f209a97f2 [AArch64] Fix legality info passed to demanded bits for TBI opt.
The (seldom-used) TBI-aware optimization had a typo lying dormant since
it was first introduced, in r252573:  when asking for demanded bits, it
told TLI that it was running after legalize, where the opposite was
true.

This is an important piece of information, that the demanded bits
analysis uses to make assumptions about the node.  r301019 added such an
assumption, which was broken by the TBI combine.

Instead, pass the correct flags to TLO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309323 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 21:27:25 +00:00
Dinar Temirbulatov 9cb09d5cf8 Change prefix in vector-shuffle-combining-avx.patch to reduce test size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309315 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 19:47:35 +00:00
Simon Pilgrim efbdc2d952 [SelectionDAG] Improve DAGTypeLegalizer::convertMask assertion (PR33960)
Improve DAGTypeLegalizer::convertMask's isSETCCorConvertedSETCC assertion to properly check for any mixture of SETCC or BUILD_VECTOR of constants, or a logical mask op of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 18:15:54 +00:00
Dinar Temirbulatov 15b834ad7b [X86] SET0 to use XMM registers where possible PR26018 PR32862
Differential Revision: https://reviews.llvm.org/D35839


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309298 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 17:47:01 +00:00
Andrew V. Tischenko f047f45845 Added cost of ZEROALL and ZEROUPPER instrs in btver2 cpu.
Differential Revision https://reviews.llvm.org/D35834


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309269 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 13:12:08 +00:00
Simon Pilgrim 2eb23f10ae [X86][AVX] Regenerate shuffle tests with broadcast comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309266 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 12:32:45 +00:00
Simon Pilgrim be73cbb584 [X86] Adding test cases for LEA factorization (PR32755 / D35014)
Differential Revision: https://reviews.llvm.org/D35886

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 10:36:09 +00:00
Hiroshi Inoue 3356bc7f45 [PowerPC] enable optimizeCompareInstr for branch with static branch hint
In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible.
If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309255 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 08:14:48 +00:00
Stanislav Mekhanoshin ddb10d2e51 [AMDGPU] Optimize SI_IF lowering for simple if regions
Currently SI_IF results in a s_and_saveexec_b64 followed by s_xor_b64.
The xor is used to extract only the changed bits. In case of a simple
if region where the only use of that value is in the SI_END_CF to
restore the old exec mask, we can omit the xor and perform an or of
the exec mask with the original exec value saved by the
s_and_saveexec_b64.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309185 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 21:29:15 +00:00
Wei Ding af7be0d4b0 AMDGPU : Widen extending scalar loads to 32-bits.
Differential Revision: http://reviews.llvm.org/D35146

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309178 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 21:07:28 +00:00
Matt Arsenault b485eb2278 AMDGPU: Fix using SMRD instructions for argument loads in functions
These are not actually uniform values except in kernels.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309172 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 20:39:42 +00:00
Tom Stellard 9f8f952c9a AMDGPU/GlobalISel: Mark 32-bit G_OR as legal
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309165 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 20:00:53 +00:00
Andrew V. Tischenko 69469a788b This patch returns proper value to indicate the case when instruction throughput can't be calculated.
Differential revision https://reviews.llvm.org/D35831


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309156 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 18:55:14 +00:00