[SelectionDAGBuilder] Bugfix in visitInlineAsm()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sun, 5 Sep 2021 15:27:22 +0000 (17:27 +0200)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 6 Sep 2021 15:46:31 +0000 (17:46 +0200)
commit118997d8e931dcb4c6e972611a7e4febcc33a061
tree1bbb8a7e6d8b6ac471adae84d014f8a56b3b85a6
parent0d83e7203479d6bc7368d5b94351e4907c2afafc
[SelectionDAGBuilder]  Bugfix in visitInlineAsm()

In case of a virtual register tied to a phys-def, the register class needs to
be computed. Make sure that this works generally also with fast regalloc by
using TLI.getRegClassFor() whenever possible, and make only the case of
'Untyped' use getMinimalPhysRegClass().

Fixes https://bugs.llvm.org/show_bug.cgi?id=51699.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D109291
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/20210831-inlineasm.ll [new file with mode: 0644]