The class of instructions that write to narrow top/bottom lanes only demand the even or odd elements of the input lanes. Which means that VMOVNT; VMOVNB demands no lanes from the original input. This teaches that to instcombine from the target hooks available through ARMTTIImpl.
Details
Diff Detail
Event Timeline
Before I continue reading the rest, just wanted to check this:
The class of instructions that write to narrow top/bottom lanes only demand the even or odd elements of the input lanes. Which means that VMOVNT; VMOVNB demands no lanes from the original input.
I don't follow the conclusion here that the VMOVNT; VMOVNB don't demand lanes from the original input, because we do read from the original input?
Oh yeah, good point - the predicated intrinsics will not work this way if they are not acting on all lanes. I had forgotten that the first input is also the passthrough value. I'll update the patch to remove those.
For the non-predicated cases I mean to say - if you have overwritten the top lanes and you have overwritten the bottom lanes - then no value from the original input are demanded. You have overridden all the lanes. So a VMOVNT will demand the bottom (even) lanes from the first input and insert a new value into into the top (odd) lanes. A VMOVNB will demand the top (odd) lanes and write new values into the bottom. A pair of X=VMOVNT A, B; Y= VMOVNB X, C will use none of the lanes of A.
Ah, thanks, got it, that's clear! Looks like a good change to me.
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | ||
---|---|---|
276 | The constants 2, 4, and 7 here were not immediately obvious to me. Perhaps a comment would help less familiar readers. |
The constants 2, 4, and 7 here were not immediately obvious to me. Perhaps a comment would help less familiar readers.