[PATCH] D60333: [X86][SSE] SimplifyDemandedBitsForTargetNode - Add PACKSS support
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 5 14:10:30 PDT 2019
nikic added a comment.
This looks right to me, but I think we should be able to do better. The sign bit of the result is determined only by the sign bit of the input. Any other bit is determined by the same bit in the input, as well as the high half of the input. I'm thinking something along these lines:
APInt DemandedBits;
if (OriginalDemandedBits.isSignMask()) {
DemandedBits = APInt::getSignMask(BitWidth * 2);
} else {
DemandedBits = OriginalDemandedBits.zext(BitWidth * 2);
DemandedBits.setHighBits(BitWidth);
}
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60333/new/
https://reviews.llvm.org/D60333
More information about the llvm-commits
mailing list