[PATCH] D109437: [PowerPC] FP compare and test XL compat builtins.

Lei Huang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 20 14:21:15 PDT 2021


lei added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:3518
+// valid. The argument must be either a 'float' or a 'double'.
+bool Sema::CheckPPCTestDataClassType(CallExpr *TheCall) {
+  QualType ArgType = TheCall->getArg(0)->getType();
----------------
I don't think this need to be function in the Sema class.  It can just be a static function.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10390
+  case Intrinsic::ppc_test_data_class_d:
+  case Intrinsic::ppc_test_data_class_f: {
+    unsigned CmprOpc = PPC::XSCMPEXPDP;
----------------
I think it'll be more clear if you move `ppc_test_data-*` handling out of this case stmt and move them into their own since they don't use the same `CmprOpc` or `Op[1|2]` as the other instrinsics.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109437



More information about the cfe-commits mailing list