[PATCH] D82020: PowerPC-specific builtin constrained FP enablement

Qing Shan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 21 19:34:57 PDT 2020


steven.zhang added a comment.

LGTM overall with some minor comments.



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14238
              BuiltinID == PPC::BI__builtin_vsx_xvrspi)
-      ID = Intrinsic::round;
+      ID = Builder.getIsFPConstrained() ? Intrinsic::experimental_constrained_round : Intrinsic::round;
     else if (BuiltinID == PPC::BI__builtin_vsx_xvrdpic ||
----------------
line too long. Please format the code with clang-format. 


================
Comment at: clang/test/CodeGen/builtins-ppc-fpconstrained.c:4
+// RUN: -disable-O0-optnone -Wall -Wno-unused -Werror -emit-llvm %s -o - | \
+// RUN: FileCheck --check-prefix=CHECK-UNCONSTRAINED -vv %s
+// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
----------------
Do we have to specify option "-disable-O0-optnone -Wall -Wno-unused -Werror" ?


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

https://reviews.llvm.org/D82020





More information about the cfe-commits mailing list