[llvm] [ValueTracking][X86] Compute KnownBits for phadd/phsub (PR #92429)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 18 23:55:32 PDT 2024
================
@@ -1725,6 +1725,54 @@ static void computeKnownBitsFromOperator(const Operator *I,
case Intrinsic::x86_sse42_crc32_64_64:
Known.Zero.setBitsFrom(32);
break;
+ case Intrinsic::x86_ssse3_phadd_d:
+ case Intrinsic::x86_ssse3_phadd_w:
+ case Intrinsic::x86_ssse3_phadd_d_128:
+ case Intrinsic::x86_ssse3_phadd_w_128:
+ case Intrinsic::x86_avx2_phadd_d:
+ case Intrinsic::x86_avx2_phadd_w: {
+ computeKnownBits(I->getOperand(0), DemandedElts, Known, Depth + 1, Q);
+ computeKnownBits(I->getOperand(1), DemandedElts, Known2, Depth + 1, Q);
+
+ Known = KnownBits::computeForAddSub(true, false, false, Known, Known)
+ .intersectWith(KnownBits::computeForAddSub(
+ true, false, false, Known2, Known2));
----------------
mskamp wrote:
Done.
https://github.com/llvm/llvm-project/pull/92429
More information about the llvm-commits
mailing list