[PATCH] D49128: AMDGPU: Refer to skipped inputs by original argument index

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 06:50:27 PDT 2018


arsenm created this revision.
arsenm added reviewers: mareko, nhaehnle.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng, kzhuravl.

Anything else is really unworkable since it depends on how
the types decide to be decomposed.


https://reviews.llvm.org/D49128

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp


Index: lib/Target/AMDGPU/SIISelLowering.cpp
===================================================================
--- lib/Target/AMDGPU/SIISelLowering.cpp
+++ lib/Target/AMDGPU/SIISelLowering.cpp
@@ -1273,7 +1273,7 @@
 
       if (!Arg.Used && !Info->isPSInputAllocated(PSInputNum)) {
         // We can safely skip PS inputs.
-        Skipped.set(I);
+        Skipped.set(Arg.getOrigArgIndex());
         ++PSInputNum;
         continue;
       }
@@ -1784,7 +1784,7 @@
 
    for (unsigned i = 0, e = Ins.size(), ArgIdx = 0; i != e; ++i) {
     const ISD::InputArg &Arg = Ins[i];
-    if (Skipped[i]) {
+    if (Arg.isOrigArg() && Skipped[Arg.getOrigArgIndex()]) {
       InVals.push_back(DAG.getUNDEF(Arg.VT));
       continue;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49128.154788.patch
Type: text/x-patch
Size: 734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180710/aa4fe0e3/attachment.bin>


More information about the llvm-commits mailing list