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

Qing Shan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 17 18:54:50 PDT 2020


steven.zhang added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14069
+          BuiltinID == PPC::BI__builtin_vsx_xvrspim)
+        ID = Intrinsic::floor;
+      else if (BuiltinID == PPC::BI__builtin_vsx_xvrdpi ||
----------------
Can we do it like this to avoid the duplicate if statement ?
```
if (...)
   ID = Builder.getIsFPConstrained() ? Intrinsic::experimental_constrained_floor : Intrinsic::floor;
 ...
 return Builder.getIsFPConstrained() ? Builder. CreateConstrainedFPCall() : Builder.CreateCall();
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82020





More information about the cfe-commits mailing list