[llvm] [Reland][PatternMatch] Add `m_[Shift]OrSelf` matchers. (PR #154375)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 05:28:20 PDT 2025
================
@@ -627,17 +627,15 @@ struct LoadOps {
// (ZExt(L1) << shift1) | ZExt(L2) -> ZExt(L3)
static bool foldLoadsRecursive(Value *V, LoadOps &LOps, const DataLayout &DL,
AliasAnalysis &AA) {
- const APInt *ShAmt2 = nullptr;
+ uint64_t ShAmt2;
Value *X;
Instruction *L1, *L2;
// Go to the last node with loads.
- if (match(V, m_OneUse(m_c_Or(
- m_Value(X),
- m_OneUse(m_Shl(m_OneUse(m_ZExt(m_OneUse(m_Instruction(L2)))),
- m_APInt(ShAmt2)))))) ||
- match(V, m_OneUse(m_Or(m_Value(X),
----------------
dtcxzyw wrote:
It should be `m_c_Or`.
https://github.com/llvm/llvm-project/pull/154375
More information about the llvm-commits
mailing list