[PATCH] D156737: clang: Add __builtin_elementwise_sqrt

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 14:23:44 PDT 2023


arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2548
+    case Builtin::BI__builtin_sqrtf128:
+    case Builtin::BI__builtin_elementwise_sqrt: {
       llvm::Value *Call = emitUnaryMaybeConstrainedFPBuiltin(
----------------
bob80905 wrote:
> Nit: I think despite this code working, it should be moved to be grouped with the other elementwise builtins at around line 3240.
> Consider BI__builtin_log at around 2436 and the other log builtins, the bultin_elementwise_log builtin is not in that group since it's with the other elementwise builtins. Writing this case here would make an inconsistency with the placement of the other elementwise builtins.
I think it's more important to group with the emission of the metadata

Also don't understand why there is a broken constrained path and a redundant set of constrained handling in IRBuilder


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

https://reviews.llvm.org/D156737



More information about the cfe-commits mailing list