[PATCH] D103986: [PowerPC] Floating Point Builtins for XL Compat.

Victor Huang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 30 13:26:27 PDT 2021


NeHuang added a comment.

Overall looks good. Some nits as below.



================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-fp.c:9
+// RUN: -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
+
+double test_fric(double a) {
----------------
- You can define three extern variables for all the bulitins.
```
extern double a;
extern float b;
extern float c;
```
- You can auto update the test case with utils/update_cc_test_checks.py


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4990
   case ISD::INTRINSIC_WO_CHAIN: {
+
+    if (N->getConstantOperandVal(0) == Intrinsic::ppc_fsels) {
----------------
you can delete blank line and better add comments for the operation below.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4992
+    if (N->getConstantOperandVal(0) == Intrinsic::ppc_fsels) {
+      SDValue ops[] = {N->getOperand(1), N->getOperand(2), N->getOperand(3)};
+      CurDAG->SelectNodeTo(N, PPC::FSELS, MVT::f32, ops);
----------------
Please use `Ops` as the variable name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103986



More information about the cfe-commits mailing list