[PATCH] D58911: DAG: Don't break value dependencies when sorting loads by offset

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 10:18:15 PST 2019


arsenm created this revision.
arsenm added reviewers: bogner, rampitec, cfang, sunfish.
Herald added subscribers: mgrang, tpr, nhaehnle, wdng, jvesely, MatzeB.

AMDGPU has some load instructions that write into the high bits of the
destination register, and have a tied input for the low input
 bits. These can easily have the same base pointer, but be a swizzle so
the high address load needs to come first. This was inserting glue
forcing the opposite ordering, producing a cycle the InstrEmitter
would assert on. Consider if two loads depend on each other before
sorting them.

      

Fixes bug 40936 by reverting r351379, which added a hacky attempt to
fix this by adding chains in this case, which I think was just working
around broken glue before the InstrEmitter. The core of the patch is
re-implementing the fix for that problem.


https://reviews.llvm.org/D58911

Files:
  lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/chain-hi-to-lo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58911.189162.patch
Type: text/x-patch
Size: 6738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190304/103c1ea3/attachment.bin>


More information about the llvm-commits mailing list