[PATCH] D134260: [AArch64] Add GPR rr instructions to isAssociativeAndCommutative

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 03:40:33 PDT 2022


dmgreen added a comment.

The swift-return test shows it best, where it changes:

  ; CHECK:  add     [[TMP:x.*]], x0, x1
  ; CHECK:  add     [[TMP]], [[TMP]], x2
  ; CHECK:  add     [[TMP]], [[TMP]], x3
  ; CHECK:  add     x0, [[TMP]], x4

To:

  ; CHECK:  add     [[TMP:x.*]], x0, x1
  ; CHECK:  add     [[TMP2:x.*]], x2, x3
  ; CHECK:  add     [[TMP]], [[TMP]], [[TMP2]]
  ; CHECK:  add     x0, [[TMP]], x4

This allow the first two operations to be executed in parallel. This reassociation in the machine combiner is what this patch now allows.


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

https://reviews.llvm.org/D134260



More information about the llvm-commits mailing list