[PATCH] D99635: [SelectionDAG] Add extra check on asm operand legalization.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 18:03:05 PDT 2021


hliao added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8190-8191
          OpInfo.Type == InlineAsm::isInput) &&
-        !TRI.isTypeLegalForClass(*RC, OpInfo.ConstraintVT)) {
+        (!TLI.isTypeLegal(OpInfo.ConstraintVT) ||
+         !TRI.isTypeLegalForClass(*RC, OpInfo.ConstraintVT))) {
       // Try to convert to the first EVT that the reg class contains.  If the
----------------
arsenm wrote:
> I'm not sure I see what case this fixes exactly. The concept of type legality is so convoluted already.
this change fixes the issue shown in `llvm/test/CodeGen/AMDGPU/inline-asm.i128.ll`. I was working on a similar issue reported but found your previous change removing i128 as a legal type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99635



More information about the llvm-commits mailing list