[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 11:16:43 PDT 2022


spatel added a comment.

Please add other reviewers to help review this.

There is some miscommunication happening, and I'm not sure how to fix it:

1. You said that we would not test shl patterns, but the tests have shl (X * 4) --> (X << 2)
2. I asked about commuting %a0 (currently at line 169), but there is still no coverage for `%a0 = add i32 %y, %x` ?



================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:775
     // to "(A op C) op' (B op C)" results in simplifications.
     Value *A = Op0->getOperand(0), *B = Op0->getOperand(1), *C = RHS;
     Instruction::BinaryOps InnerOpcode = Op0->getOpcode(); // op'
----------------
The brackets that you are proposing to remove are likely protecting against shadow variable declaration compile-time warnings.

Please remove this diff from this patch. 

I suggest one of the following to improve this code (as a separate commit):
1. Rename the set of variables above with unique names (and adjust the code comments to match).
2. Rename the set of variables here with unique names (and adjust the code comments to match).
3. Create a helper function for the Factorization set of folds, so there is no confusion.


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

https://reviews.llvm.org/D136912



More information about the llvm-commits mailing list