[PATCH] D142313: [PowerPC] Replace PPCISD::VABSD cases with generic ISD::ABDU(X,Y) node

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 03:36:10 PST 2023


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

LGTM. Thanks for cleaning this up and sorry about the delay in reviewing it.



================
Comment at: llvm/test/CodeGen/PowerPC/ppc64-P9-vabsd.ll:1249
 entry:
   %sub = sub <4 x i32> %a, %b
   %sub.i = sub <4 x i32> zeroinitializer, %sub
----------------
RKSimon wrote:
> if we replace this with sub nsw then the fold is legal
I suppose the test case then becomes equivalent to `sub_absv_32()` other than the use of the `vmaxsw` intrinsic. I think we can just add the flag so the test case shows the desired code-gen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142313



More information about the llvm-commits mailing list