[PATCH] D136912: [AArch64] precommit tests and code format for D136623, NFC

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 08:10:09 PDT 2022


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


================
Comment at: llvm/test/Transforms/InstCombine/add4.ll:159
+
+; TODO: (x + y) + (x * 4) --> (x * 5) + y
+define i32 @mul_add_common_factor_commute2(i32 %x, i32 %y) {
----------------
spatel wrote:
> This doesn't match the code. Did you intend to commute the final add operands?
> 
> In general, I find it easier to follow the pattern progression if you name the values based on the operation. For example:
>   %m = mul i32 %x, 5
>   %a = add i32 %x, 42
Yes, at the 1st step, I'll swap the add operands when the **mul **on the right.

Thanks for your demo case, I rename the values.


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

https://reviews.llvm.org/D136912



More information about the llvm-commits mailing list