Similar to using tbl to lower vector ZExts, tbl4 can be used to lower
vector truncates.
The initial version support i32->i8 conversions.
Depends on D120571
Paths
| Differential D133495
[AArch64] Lower vector trunc using tbl. ClosedPublic Authored by fhahn on Sep 8 2022, 7:52 AM.
Details Summary Similar to using tbl to lower vector ZExts, tbl4 can be used to lower The initial version support i32->i8 conversions. Depends on D120571
Diff Detail
Event Timelinefhahn added a child revision: D133496: [AArch64] Use tbl for truncating vector FPtoUI conversions..Sep 8 2022, 7:58 AM
fhahn marked an inline comment as done. Comment ActionsThanks Tim, I updated the code to account for big-endian targets by adjusting the mask as suggested offline. fhahn added inline comments.
This revision is now accepted and ready to land.Sep 16 2022, 1:25 AM This revision was landed with ongoing or failed builds.Sep 16 2022, 4:43 AM Closed by commit rG8491d01cc385: [AArch64] Lower vector trunc using tbl. (authored by fhahn). · Explain Why This revision was automatically updated to reflect the committed changes. fhahn marked 2 inline comments as done.
Revision Contents
Diff 460699 llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/trunc-to-tbl.ll
|
Further to our big-endian discussion, I think this bitcast will put the least significant byte into elements 3, 7, 11, 15. So the for loop below should account for that.