[PATCH] D133340: [PowerPC][GISel]select floating point constant from TOC
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 17:02:31 PST 2022
shchenz added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCInstructionSelector.cpp:292-296
+ auto LoadInst = BuildMI(*I.getParent(), I, I.getDebugLoc(),
+ TII.get(TargetOpcode::G_LOAD), DstReg)
+ .addReg(AddrReg)
+ .addMemOperand(MMO);
+
----------------
arsenm wrote:
> This should have been done in the legalizer, not the selector
I am not quite sure I understand your suggestion here. Do you mean we set action for G_FCONSTANT as custom for S32 and S64 in PPCLegalizerInfo? For my understanding, legalizer should do legalization for the types that are illegal for some opcodes on a certain target, right? float and double are both valid types on PPC. So not sure why we need to legalize them or do I misunderstand your comment? Thank you!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133340/new/
https://reviews.llvm.org/D133340
More information about the llvm-commits
mailing list