[PATCH] D67602: GlobalISel: Handle llvm.read_register

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 10:11:49 PDT 2019


rengolin added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:1529
+    EVT VT = TLI->getValueType(*DL, CI.getType());
+    Register Reg = TLI->getRegisterByName(RegStr->getString().data(), VT, *MF);
+    if (!Reg.isValid())
----------------
paquette wrote:
> `TLI->getRegisterByName` can't handle sysregs on the AArch64 side, since they're modelled as immediate operands. So, this approach can't work for AArch64.
> 
> (see llvm/test/CodeGen/AArch64/special-reg.ll for an example)
By design, they can only get the stack pointer, I think on any target. It should be an assembler error otherwise.


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

https://reviews.llvm.org/D67602





More information about the llvm-commits mailing list