[PATCH] D68035: [PowerPC] Extend custom lower of vector truncate to handle wider input
Roland Froese via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 15:04:39 PDT 2020
RolandF marked an inline comment as done.
RolandF added a comment.
Resolve comment.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10208
isOperationCustom(N->getOpcode(), TrgVT) &&
- OpVT.getSizeInBits() <= 128 &&
+ OpVT.getSizeInBits() <= 256 &&
+ isPowerOf2_32(TrgVT.getVectorElementType().getSizeInBits()) &&
----------------
nemanjai wrote:
> We check that the number of elements in the wide input is a power of 2 as well as that the target element type width is a power of 2.
> What happens with something weird like `trunc <8 x i24> to <8 x i16>` (also, please add such a test case)?
Moved checks to lowering function. There was an existing check for source bit width. so 8x24 was skipped.. Added some additional checking. Added an 8x24 test to the test case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68035/new/
https://reviews.llvm.org/D68035
More information about the llvm-commits
mailing list