[PATCH] D43444: [AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 08:57:35 PST 2018



> On Feb 21, 2018, at 11:00 PM, Amara Emerson via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> aemerson added inline comments.
> 
> 
> ================
> Comment at: lib/Target/AArch64/AArch64InstructionSelector.cpp:330
> +      .addDef(SubRegCopy)
> +      .addUse(CopyReg, 0, AArch64::hsub);
> +
> ----------------
> qcolombet wrote:
>> At this point of the pipeline we usually don't write copy from subregs directly.
>> Could you use EXTRACT_SUBREG instead?
> That’s what I tried initially, but ExpandPseudos fell over because it expects all EXTRACT_SUBREGs to be eliminated by then. Apparently EXTRACT_SUBREG is normally converted to copies in InstrEmitter during SDISel, so the rest of the pipeline isn’t prepared to deal with it.

Oh interesting, I thought those were eliminated by the two addr pass like any other COPY related instruction.

Thanks for checking.

> 
> 
> Repository:
>  rL LLVM
> 
> https://reviews.llvm.org/D43444
> 
> 
> 



More information about the llvm-commits mailing list