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

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 20:23:01 PDT 2021


hliao created this revision.
hliao added reviewers: JustinBorb, arsenm.
Herald added subscribers: ecnelises, kerbowa, hiraditya, nhaehnle, jvesely.
hliao requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

- Besides checking whether the RC has legal type for the corresponding operand, need to check that type's legality from the whole target's point of view. That's because a specific type may be designated as a legal one per RC for certain instructions but it may not be generally legal in a target. In that case, we still need to legalize that value through `bitcast` so that the input and output of that inline asm is well prepared for its itself or its user.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99635

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/Target/AMDGPU/SIRegisterInfo.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-flat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-global.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-local-128.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-flat.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-global.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99635.334333.patch
Type: text/x-patch
Size: 15179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210331/83e2bf69/attachment.bin>


More information about the llvm-commits mailing list