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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 07:01:45 PDT 2022


spatel 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) {
----------------
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


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

https://reviews.llvm.org/D136912



More information about the llvm-commits mailing list