[PATCH] D106021: [PowerPC] Add PowerPC population count, reversed load and store related builtins and instrinsics for XL compatibility

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 15 13:42:40 PDT 2021


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

LGTM as long as the redundant clear is removed.



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15098
+  case PPC::BI__builtin_ppc_poppar8: {
+    Value *ArgValue = EmitScalarExpr(E->getArg(0));
+
----------------
Isn't this just `Ops[0]`?


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:5276
+def : Pat<(int_ppc_store2r gprc:$a, ForceXForm:$ptr),
+          (STHBRX (RLWINM gprc:$a, 0, 16, 31), ForceXForm:$ptr)>;
+def : Pat<(int_ppc_store4r gprc:$a, ForceXForm:$ptr),
----------------
The clear is redundant. Why do we need to clear the bits that we won't store to begin with?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106021



More information about the cfe-commits mailing list