[llvm-dev] [X86] Is it possible to implicitly promote a virtual subregister to a super?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 20 09:09:35 PST 2021
On Wed, 20 Jan 2021 at 16:30, Constable, Scott D
<scott.d.constable at intel.com> wrote:
> The actual implementation I'm doing is a bit more complex than the example I provided for illustrative purposes. In my case, I don't need to care about the upper bits at all.
OK, in that case I think SUBREG_TO_REG is what you want. Something like
BuildMI(MBB, InsertPt, Loc, TII->get(X86::SUBREG_TO_REG), ExtendedReg)
.addImm(0) // Never been entirely sure what this was here for.
It's always 0.
.addReg(NarrowReg)
.addImm(X86::sub_16bit);
then use ExtendedReg (a GR32 vreg) in the compare.
Cheers.
Tim.
More information about the llvm-dev
mailing list