[PATCH] D101806: [TargetLowering] Only inspect attributes in the arguments for ArgListEntry

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 10:58:48 PDT 2021


rnk added a comment.

There are also two other ISel implementations to consider, perhaps they have the same bug: fastisel and globalisel. I think it's worth a quick code search.

I think it's also reasonable to add a dedicated test for this. Calling a function with a mismatched prototype is UB, so the compiler is probably entitled to generate arbitrary code (trap), but it should generate something. The example I provided in the other code review is a good starting point.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:119-121
+  // Don't look at the callee parameter attributes for the following ABI
+  // attributes. We can't verify that the following attributes are consistent
+  // between the callee parameters and the caller's arguments.
----------------
I think this also applies to all the attributes above. I assume that doing this to every attribute check may require updating more tests, but I think it's the right thing to do in the long run. I can live with a FIXME comment for now, but I want the code to document that it's the ABI attributes on the call site that matter, not the callee.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101806/new/

https://reviews.llvm.org/D101806



More information about the llvm-commits mailing list