[llvm] [ValueTracking][X86] Compute KnownBits for phadd/phsub (PR #92429)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 15 06:21:44 PDT 2024


================
@@ -541,6 +541,33 @@ void llvm::processShuffleMasks(
   }
 }
 
+void llvm::getHorizDemandedEltsForFirstOperand(unsigned VectorBitWidth,
+                                               const APInt &DemandedElts,
+                                               APInt &DemandedLHS,
+                                               APInt &DemandedRHS) {
+  int NumLanes = std::max<int>(1, VectorBitWidth / 128);
----------------
mskamp wrote:

It seems that KnownBits computation is very limited for `x86_mmx`. Hence, I think, it's not worth the trouble to keep the computation for the MMX variants of `phadd`. Therefore, I've removed the support and added the suggested assert.

https://github.com/llvm/llvm-project/pull/92429


More information about the llvm-commits mailing list