[llvm] [X86] computeKnownBitsForTargetNode - add INTRINSIC_WO_CHAIN handling for PSADBW intrinsics (PR #83580)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 17:13:46 PST 2024
================
@@ -36980,6 +36980,18 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
}
break;
}
+ case ISD::INTRINSIC_WO_CHAIN: {
+ switch (Op->getConstantOperandVal(0)) {
+ case Intrinsic::x86_sse2_psad_bw:
+ case Intrinsic::x86_avx2_psad_bw:
+ case Intrinsic::x86_avx512_psad_bw_512:
+ // PSADBW - fills low 16 bits and zeros upper 48 bits of each i64 result.
+ assert(VT.getScalarType() == MVT::i64 && "Unexpected PSADBW types");
+ Known.Zero.setBitsFrom(16);
+ break;
----------------
topperc wrote:
I know its documented as being 16 bits, but its worst case 11 bits I think. 255*8 fits in 11 bits.
https://github.com/llvm/llvm-project/pull/83580
More information about the llvm-commits
mailing list