[llvm] [DAGCombiner] Teach MatchLoadCombine to look through AND masks (PR #200247)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 07:05:05 PDT 2026


================
@@ -9539,7 +9539,7 @@ using SDByteProvider = ByteProvider<SDNode *>;
 static std::optional<SDByteProvider>
 calculateByteProvider(SDValue Op, unsigned Index, unsigned Depth,
                       std::optional<uint64_t> VectorIndex,
-                      unsigned StartingIndex = 0) {
+                      unsigned StartingIndex = 0, uint8_t *ByteMask = nullptr) {
----------------
RKSimon wrote:

```suggestion
                      unsigned StartingIndex = 0, const uint8_t *ByteMask = nullptr) {
```
Ideally this should be an ArrayRef or something - not a raw pointer

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


More information about the llvm-commits mailing list