[PATCH] D116915: [DAGCombiner][AArch64] Enhance to support for scalar CSINC

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 23 17:06:39 PST 2022


Allen added a comment.

In D116915#3261832 <https://reviews.llvm.org/D116915#3261832>, @dmgreen wrote:

> Thanks. And the CopyFromReg? This is currently converting `add(csel(C, 1, cc), CopyFromReg(x))` into `csinc(add(x, C), x)`. I'm not sure why it would be limited to a CopyFromReg. I would expect to convert any `add(csel(C, 1, cc), y)` (or `add(y, csel(C, 1, cc))` as add is commutative).

Thanks for detail advice, I updated in three point
1、Handle commutivity
2、prevent large const value , and add related test case
3、delete the condition CopyFromReg


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116915/new/

https://reviews.llvm.org/D116915



More information about the llvm-commits mailing list