[PATCH] D82340: [AArch64][GlobalISel] Improve codegen for some constant vectors by using constant pool loads
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 10:10:33 PDT 2020
aemerson marked an inline comment as done.
aemerson added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:4503-4509
+ auto *OpMI =
+ getOpcodeDef(TargetOpcode::G_CONSTANT, I.getOperand(Idx).getReg(), MRI);
+ if (OpMI)
+ Csts.emplace_back(
+ const_cast<ConstantInt *>(OpMI->getOperand(1).getCImm()));
+ else if ((OpMI = getOpcodeDef(TargetOpcode::G_FCONSTANT,
+ I.getOperand(Idx).getReg(), MRI)))
----------------
paquette wrote:
> Can `getConstantVRegValWithLookThrough` handle this?
>
> It has a `HandleFConstants` parameter.
getConstantVRegWithLookThrough tries to return an int64_t, but here I need to find the actual ConstantInt/ConstantFP IR values in order to generate the constant pool entries.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82340/new/
https://reviews.llvm.org/D82340
More information about the llvm-commits
mailing list