[PATCH] D133340: [PowerPC][GISel]select floating point constant from TOC
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 23:22:59 PST 2022
shchenz marked 3 inline comments as done.
shchenz added a comment.
> If I'm reading this correctly, the DAG handles this by letting the ConstantFP lower to a generic load with a constant pool PseudoSourceValue. I think that would be a better approach, rather than directly selecting G_FCONSTANT. You would avoid needing special 64-bit and 32-bit handling
Make sense. I updated the patch to generate a generic load while selecting ConstantFP, so that we can handle the load type inside the selection for G_LOAD. We still have to directly select the address for global variables, DAG handles this in both PPCISelDAGTODAG.cpp and td file.
One improvement implemented in DAG and directly selecting, but missing in the new method, we can further improve our code generation for medium code model in further patch:
addi 3, 3, .LCPI0_0 at toc@l
lfs 1, 0(3)
->
lfs 1, .LCPI0_0 at toc@l(3)
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