[PATCH] D144379: [AArch64] Fix abs(sub nsw) -> absd

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 05:30:41 PST 2023


SjoerdMeijer added a comment.

Thanks for looking into this. 
I will let @RKSimon comment on the usage of the TTI hook.

I had a couple of nits about the tests, see inlined.
You can consider to "precommit" the tests: put them up for review separately, then rebase this patch on top of that. The codegen differences are easy to spot here, so not necessary, but up to you if you want to get that out of the way first.



================
Comment at: llvm/test/CodeGen/AArch64/neon-saba.ll:5
+target triple = "aarch64-unknown-linux-gnu"
+attributes #0 = { "target-features"="+neon,+neon,+sve2" }
+
----------------
If this is NEON, then we probably don't want to be passing +sve2 here.
And +neon is passed twice.


================
Comment at: llvm/test/CodeGen/AArch64/sve-saba.ll:5
+target triple = "aarch64-unknown-linux-gnu"
+attributes #0 = { "target-features"="+neon,+sve,+sve2" }
+
----------------
sve is implied by sve2, and I think neon is implied too, so just sve2 will suffice.

I don't have a strong opinion on this, but you can also use `llc -mattr=+sve2` so you don't need these attributes at all.


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

https://reviews.llvm.org/D144379



More information about the llvm-commits mailing list