This is another potential regression exposed by D63815.
Here we peek through a bitcast to find an extract subvector and scale the splat offset based on that:
splat (bitcast (extract X, C)), LaneC --> duplane (bitcast X), LaneC'
Paths
| Differential D71672
[AArch64] match splat of bitcasted extract subvector to DUPLANE ClosedPublic Authored by spatel on Dec 18 2019, 12:49 PM.
Details Summary This is another potential regression exposed by D63815. Here we peek through a bitcast to find an extract subvector and scale the splat offset based on that:
Diff Detail Event Timeline
spatel marked an inline comment as done. Comment ActionsPatch updated:
spatel marked an inline comment as done. Comment ActionsPatch updated: This revision is now accepted and ready to land.Dec 20 2019, 1:18 PM Closed by commit rG0b38af89e2c0: [AArch64] match splat of bitcasted extract subvector to DUPLANE (authored by spatel). · Explain WhyDec 22 2019, 6:02 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 234598 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/arm64-neon-2velem.ll
|
Can you fix the comments here, so each of these transforms has its own comment briefly explaining what it does?
V1.getOperand(0).getScalarValueSizeInBits() % VTEltBitWidth == 0 seems overly restrictive. I guess you have to enforce that the EXTRACT_SUBVECTOR index is appropriately aligned, but it would be okay to allow, for example, <16 x i8> with index 8. Maybe translate the EXTRACT_SUBVECTOR index to a byte offset, then divide by the element size of the result? That should also make the logic a little easier to follow.