[llvm] [InstCombine] Extend bitmask mul combine to handle independent operands (PR #142503)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 05:57:48 PDT 2025


================
@@ -3664,32 +3664,35 @@ static std::optional<DecomposedBitMaskMul> matchBitmaskMul(Value *V) {
   return std::nullopt;
 }
 
-using CombinedBitmaskMul =
-    std::pair<std::optional<DecomposedBitMaskMul>, Value *>;
+struct CombinedBitmaskMul {
+  std::optional<DecomposedBitMaskMul> Decomp = std::nullopt;
----------------
arsenm wrote:

```suggestion
  std::optional<DecomposedBitMaskMul> Decomp;
```

This already default constructs to nullopt 

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


More information about the llvm-commits mailing list