Commit Graph

2624 Commits

Author SHA1 Message Date
Amaury Sechet f617d679a3 [AMDGPU] Automatically generate various tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369787 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 17:58:49 +00:00
Jay Foad 9c7f3a51fd [AMDGPU] gfx10 atomic optimizer changes.
Summary:
Add support for gfx10, where all DPP operations are confined to work
within a single row of 16 lanes, and wave32.

Reviewers: arsenm, sheredom, critson, rampitec

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369745 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 10:07:43 +00:00
Matt Arsenault 06bdf458f3 GlobalISel: Don't create G_UADDE with constant false carry in
The x86 tests are now broken (in paticular add-scalar.ll now hits the
DAG fallback) due to not handling G_UADDO. The DAG x86 backend has a
custom lowering for this, so that will need to be implemented.

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

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

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



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

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

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369417 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 17:45:25 +00:00
Matt Arsenault 6576f8b1d3 AMDGPU: Fix iterator error when lowering SI_END_CF
If the instruction is the last in the block, there is no next
instruction but the iteration still needs to look at the new block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369203 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-18 00:20:44 +00:00
Matt Arsenault c2abc890a9 AMDGPU: Reduce number of registers in test
Once the failure this is testing is fixed, this would fail due to
using too many registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368901 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 19:09:48 +00:00
Aditya Nandakumar fb900f7155 [GlobalISel]: Fix lowering of G_Shuffle_vector where we pick up the wrong source index
https://reviews.llvm.org/D66182

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368781 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 01:23:33 +00:00
Aditya Nandakumar bb2cecc494 [GlobalISel]: Fix lowering of G_SHUFFLE_VECTOR with scalar sources
https://reviews.llvm.org/D66171

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368753 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 21:49:11 +00:00
Tim Renouf 1b0576fa1b [AMDGPU] Fix to 'Fold readlane from copy of SGPR or imm'
That change (r363670) could leave a copy from vgpr to sgpr. Fixed.

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

Change-Id: I00c3fe6fda2e8e1e36f53195b881b1449c777ea4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368736 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 18:57:55 +00:00
Matt Arsenault 5508afab5c GlobalISel: Partially implement fewerElementsVector G_UNMERGE_VALUES
Odd sized vectors aren't handled yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368713 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 16:26:28 +00:00
Matt Arsenault b5027beff2 GlobalISel: Implement lower for G_SHUFFLE_VECTOR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368709 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 16:09:07 +00:00
Stanislav Mekhanoshin edb506d79d [AMDGPU] Printf runtime binding pass
This pass is a port of the according pass from the HSAIL compiler.
It parses printf calls and setup runtime printf buffer.
After that it copies printf arguments to the buffer and fills in
module metadata for runtime.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368592 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-12 17:12:29 +00:00
Hans Wennborg ad324a1d84 Revert r368339 "[MBP] Disable aggressive loop rotate in plain mode"
It caused assertions to fire when building Chromium:

  lib/CodeGen/LiveDebugValues.cpp:331: bool
  {anonymous}::LiveDebugValues::OpenRangesSet::empty() const: Assertion
  `Vars.empty() == VarLocs.empty() && "open ranges are inconsistent"' failed.

See https://crbug.com/992871#c3 for how to reproduce.

> Patch https://reviews.llvm.org/D43256 introduced more aggressive loop layout optimization which depends on profile information. If profile information is not available, the statically estimated profile information(generated by BranchProbabilityInfo.cpp) is used. If user program doesn't behave as BranchProbabilityInfo.cpp expected, the layout may be worse.
>
> To be conservative this patch restores the original layout algorithm in plain mode. But user can still try the aggressive layout optimization with -force-precise-rotation-cost=true.
>
> Differential Revision: https://reviews.llvm.org/D65673

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368579 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-12 14:23:13 +00:00
Daniel Sanders 2d2b63fa73 [globalisel] Add G_SEXT_INREG
Summary:
Targets often have instructions that can sign-extend certain cases faster
than the equivalent shift-left/arithmetic-shift-right. Such cases can be
identified by matching a shift-left/shift-right pair but there are some
issues with this in the context of combines. For example, suppose you can
sign-extend 8-bit up to 32-bit with a target extend instruction.
  %1:_(s32) = G_SHL %0:_(s32), i32 24 # (I've inlined the G_CONSTANT for brevity)
  %2:_(s32) = G_ASHR %1:_(s32), i32 24
  %3:_(s32) = G_ASHR %2:_(s32), i32 1
would reasonably combine to:
  %1:_(s32) = G_SHL %0:_(s32), i32 24
  %2:_(s32) = G_ASHR %1:_(s32), i32 25
which no longer matches the special case. If your shifts and extend are
equal cost, this would break even as a pair of shifts but if your shift is
more expensive than the extend then it's cheaper as:
  %2:_(s32) = G_SEXT_INREG %0:_(s32), i32 8
  %3:_(s32) = G_ASHR %2:_(s32), i32 1
It's possible to match the shift-pair in ISel and emit an extend and ashr.
However, this is far from the only way to break this shift pair and make
it hard to match the extends. Another example is that with the right
known-zeros, this:
  %1:_(s32) = G_SHL %0:_(s32), i32 24
  %2:_(s32) = G_ASHR %1:_(s32), i32 24
  %3:_(s32) = G_MUL %2:_(s32), i32 2
can become:
  %1:_(s32) = G_SHL %0:_(s32), i32 24
  %2:_(s32) = G_ASHR %1:_(s32), i32 23

All upstream targets have been configured to lower it to the current
G_SHL,G_ASHR pair but will likely want to make it legal in some cases to
handle their faster cases.

To follow-up: Provide a way to legalize based on the constant. At the
moment, I'm thinking that the best way to achieve this is to provide the
MI in LegalityQuery but that opens the door to breaking core principles
of the legalizer (legality is not context sensitive). That said, it's
worth noting that looking at other instructions and acting on that
information doesn't violate this principle in itself. It's only a
violation if, at the end of legalization, a pass that checks legality
without being able to see the context would say an instruction might not be
legal. That's a fairly subtle distinction so to give a concrete example,
saying %2 in:
  %1 = G_CONSTANT 16
  %2 = G_SEXT_INREG %0, %1
is legal is in violation of that principle if the legality of %2 depends
on %1 being constant and/or being 16. However, legalizing to either:
  %2 = G_SEXT_INREG %0, 16
or:
  %1 = G_CONSTANT 16
  %2:_(s32) = G_SHL %0, %1
  %3:_(s32) = G_ASHR %2, %1
depending on whether %1 is constant and 16 does not violate that principle
since both outputs are genuinely legal.

Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm

Subscribers: sdardis, jvesely, wdng, nhaehnle, rovka, kristof.beyls, javed.absar, hiraditya, jrtc27, atanasyan, Petar.Avramovic, llvm-commits

Tags: #llvm

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

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368339 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-08 20:25:23 +00:00
Tim Renouf c5c3a34221 [StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default
D62198 introduced an option to relax the checks for
hasOnlyUniformBranches. This commit turns the option on by default, for
better code generation in some cases in AMDGPU.

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

Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368042 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 14:30:19 +00:00
Austin Kerbow a186599dd5 Re-commit: [AMDGPU] Use S_DENORM_MODE for gfx10
Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.

Reviewers: arsenm, rampitec

Reviewed By: arsenm, rampitec

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367969 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 02:16:11 +00:00
Dmitri Gribenko 036f7618c9 Revert "[AMDGPU] Use S_DENORM_MODE for gfx10"
This reverts commit r367882. It broke the test
MC/Disassembler/AMDGPU/gfx10_dasm_all.txt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367904 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 18:36:43 +00:00
Austin Kerbow 5e1edf01fd [AMDGPU] Use S_DENORM_MODE for gfx10
Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.

Reviewers: arsenm, rampitec

Reviewed By: arsenm, rampitec

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367882 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 16:09:49 +00:00
Tom Stellard 3c027d4e7d AMDGPU/LoadStoreOptimizer: Set the correct offset whem merging MMOs
Summary:
This is a follow up to r367237.  MachineFunction::getMachineMemOperand()
adds the offset parameter to the existing offset instead of resetting it.
So we need to reset the offset to the correct value after calling this
function.

Reviewers: arsenm

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367881 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 16:08:44 +00:00
Matt Arsenault 8f6e6a5998 AMDGPU: Correct behavior of f16 buffer loads
Don't assume format loads for f16. Also fixes support for targets
without i16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367879 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 15:59:07 +00:00
Matt Arsenault 68d008f860 AMDGPU: Correct behavior of f16/i16 non-format store intrinsics
This was switching to use a format store for a non-format store for
f16 types. Also fixes i16/f16 stores on targets without legal f16.

The corresponding loads also need to be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367872 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 14:57:59 +00:00
Matt Arsenault 535e6a060b AMDGPU/GlobalISel: Alternative mappings for constants
Without context we assume SGPR. Allowing VGPR constants theoretically
helps avoid a copy. This seems to not actually work now, and the
choice isn't based on the use bank.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367871 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 14:40:26 +00:00
Nicolai Haehnle a9e03d45db AMDGPU: add missing llvm.amdgcn.{raw,struct}.buffer.atomic.{inc,dec}
Summary:
Wrapping increment/decrement. These aren't exposed by many APIs...

Change-Id: I1df25c7889de5a5ba76468ad8e8a2597efa9af6c

Reviewers: arsenm, tpr, dstuttard

Subscribers: kzhuravl, jvesely, wdng, yaxunl, t-tye, jfb, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367821 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 09:36:06 +00:00
Tim Northover 7ff3d073b5 IR: print value numbers for unnamed function arguments
For consistency with normal instructions and clarity when reading IR,
it's best to print the %0, %1, ... names of function arguments in
definitions.

Also modifies the parser to accept IR in that form for obvious reasons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367755 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-03 14:28:34 +00:00
Simon Pilgrim e1704f3ec8 [AMDGPU] Regenerated saddo.ll test file for D47927
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367698 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-02 17:52:55 +00:00
Matt Arsenault abab6b93e0 GlobalISel: Lower scalarizing unmerge of a vector to shifts
AMDGPU sometimes has legal s16 and <2 x s16> operations, but all
registers are really 32-bit. An unmerge destination really should ben
widened to a 32-bit register. If widening a scalarizing vector with a
target size that matches the vector size, bitcast to integer and
extract the relevant bits with shifts.

I'm not sure if this is the right place for this. This could arguably
be part of widenScalar for the result. I also have a growing feeling
that we're missing a bitcast legalize action.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367604 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 19:10:05 +00:00
Matt Arsenault 2034717089 AMDGPU: Remove v0 workaround for DS_GWS_* instructions
Any register should work for the src field since r366067, since the
used value is not pulled from the expected encoding field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367598 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 18:41:32 +00:00
Matt Arsenault 074cd073b8 GlobalISel: Fix widenScalar for G_MERGE_VALUES to pointer
AMDGPU testcase isn't broken now, but will be in a future patch
without this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367591 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 18:13:16 +00:00
David Zarzycki d5fa03d1bd [Testing] Fix tests that break with read-only checkouts
Found with `mount --bind -o ro ...` on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367519 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 06:41:40 +00:00
Fangrui Song 4ba0d42050 AMDGPU/GlobalISel: fix inst-select-load-local.mir in -DLLVM_ENABLE_ASSERTIONS=off builds after r367498
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367514 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 04:03:06 +00:00
Matt Arsenault b216057cd2 AMDGPU/GlobalISel: Fix flat load/store of pointer types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367513 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:57:42 +00:00
Matt Arsenault 62b274e7ca AMDGPU/GlobalISel: Remove manual store select code
This regresses the weird types that are newly treated as legal load
types, but fixes incorrectly using flat instrucions on SI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367512 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:52:40 +00:00
Matt Arsenault f1377e47fe AMDGPU/GlobalISel: Select local atomic cmpxchg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367511 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:41:41 +00:00
Matt Arsenault 9455340d7b AMDGPU/GlobalISel: Handle G_ATOMICRMW_FADD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367509 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:33:15 +00:00
Matt Arsenault b8f72a5a52 AMDGPU/GlobalISel: Allow selection of DS atomicrmw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367507 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:29:01 +00:00
Matt Arsenault 79e53ddffa AMDGPU/GlobalISel: Select simple local stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367504 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 03:09:15 +00:00
Matt Arsenault 9676b30e9f GlobalISel: moreElementsVector for G_LOAD/G_STORE
AMDGPU change and test is a placeholder until a future patch with
complete handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367503 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 01:44:22 +00:00
Matt Arsenault eb43d3eca1 Reapply "AMDGPU: Split block for si_end_cf"
This reverts commit r359363, reapplying r357634

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367500 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 01:25:27 +00:00
Matt Arsenault dfa7d6f913 AMDGPU/GlobalISel: Select local loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 00:53:38 +00:00
Michael Berg 435a375718 Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control
Summary: Honoring no signed zeroes is also available as a user control through clang separately regardless of fastmath or UnsafeFPMath context, DAG guards should reflect this context.

Reviewers: spatel, arsenm, hfinkel, wristow, craig.topper

Reviewed By: spatel

Subscribers: rampitec, foad, nhaehnle, wuzish, nemanjai, jvesely, wdng, javed.absar, MaskRay, jsji

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367486 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 21:57:28 +00:00
Stanislav Mekhanoshin 7ee7e52d23 [AMDGPU] Fix high occupancy calculation and print it
We had couple places which still return 10 as a maximum
occupancy. Fixed.

Also print comment about occupancy as compiler see it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367381 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 01:07:10 +00:00
Matt Arsenault abbfc8ddd8 GlobalISel: Add G_ATOMICRMW_{FADD|FSUB}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367369 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 23:56:30 +00:00
Stanislav Mekhanoshin 9388778436 [AMDGPU] Reserve all AGPRs on targets which do not have them
Differential Revision: https://reviews.llvm.org/D65471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367347 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 19:29:33 +00:00
Austin Kerbow 2664d7d186 [AMDGPU/GlobalISel] Add llvm.amdgcn.fdiv.fast legalization.
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: volkan, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367344 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 18:49:16 +00:00
Tom Stellard 6b43815b28 AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.

This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367237 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-29 16:40:58 +00:00