[PATCH] D142502: [AArch64] Add A+B+1 and A-B-1 macro fusion for Ampere1A

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 29 02:31:05 PST 2023


dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.

If you remove the extra FeatureSB changes, then this LGTM



================
Comment at: llvm/lib/Target/AArch64/AArch64.td:293
+def FeatureFuseAddSub2RegAndConstOne : SubtargetFeature<
+   "fuse-addsub-2reg-const1", "HasFuseeAddSub2RegAndConstOne", "true",
+   "CPU fuses (a + b + 1) and (a - b - 1)">;
----------------
dmgreen wrote:
> HasFuseeAddSub2RegAndConstOne -> HasFuseAddSub2RegAndConstOne
Remove this extra e too.


================
Comment at: llvm/test/CodeGen/AArch64/macro-fusion-addsub-2reg-const1.mir:1
+# RUN: llc -o - %s -mtriple=aarch64-- -mattr=+fuse-addsub-2reg-const1 -run-pass postmisched | FileCheck %s --check-prefixes=CHECK,FUSION
+# RUN: llc -o - %s -mtriple=aarch64-- -mattr=-fuse-addsub-2reg-const1 -run-pass postmisched | FileCheck %s --check-prefixes=CHECK,NOFUSION
----------------
It may be worth adding more tests for more combos of instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142502



More information about the llvm-commits mailing list