[PATCH] D47681: [DAGCombiner] Bug 31275- Extract a shift from a constant mul or udiv if a rotate can be formed

Sam Conrad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 3 16:15:27 PDT 2018


sameconrad marked an inline comment as done.
sameconrad added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5096-5100
+    if (!(RHSShift = extractShiftFromMulOrUDiv(LHSShift, RHS, RHSMask, DL)))
+      return nullptr;
+  }
+  if (NeedRotLHS) {
+    if (!(LHSShift = extractShiftFromMulOrUDiv(RHSShift, LHS, LHSMask, DL)))
----------------
lebedev.ri wrote:
> Also, it is intentional that you extract from LHS and store it into a variable named RHS and vice-versa?
> If yes, add a comment please.
Updated with some clarifying comments


https://reviews.llvm.org/D47681





More information about the llvm-commits mailing list