[llvm] [InstCombine] Refactoring matchFunnelShift (NFC) (PR #73390)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 26 21:16:14 PST 2023


================
@@ -2810,7 +2809,7 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC,
       IsFshl = false; // Sub on SHL.
     }
     if (!ShAmt)
-      return nullptr;
+      return std::nullopt;
 
     FShiftArgs = {ShVal0, ShVal1, ShAmt};
   } else if (isa<ZExtInst>(Or0) || isa<ZExtInst>(Or1)) {
----------------
quic-eikansh wrote:

I created another pull request https://github.com/llvm/llvm-project/pull/73441 which has all the code needed for my change. I was trying to created stacked pull request. This lead to same changes in different pull request.

> For the purpose you have in mind, I don't think this part should be extracted. Maybe @goldsteinn can confirm.

How do you suggest should I do it?

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


More information about the llvm-commits mailing list