[PATCH] D27779: [ARM] More aggressive matching for vpadd and vpaddl.

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 05:34:52 PST 2016


rengolin added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:9663
   // Attempt to create vpaddl for this add.
-  if (SDValue Result = AddCombineToVPADDL(N, N0, N1, DCI, Subtarget))
+  if (SDValue Result = AddCombineToVPADDLEarly(N, N0, N1, DCI, Subtarget))
+    return Result;
----------------
This looks weird. As much as I have long methods and nested `if`s, the interaction between `Early` and `Late` increases the coupling between them and make calling code more complex. (for example, you have an early exit on `Early` for later match on `Later`).

Adding an `if` block in `AddCombineToVPADDL` with an return would be much cleaner, if the condition is clear and concise, which should be the case, with your new helper.


Repository:
  rL LLVM

https://reviews.llvm.org/D27779





More information about the llvm-commits mailing list