[clang] [clang] Mark `__builtin_convertvector` and `__builtin_shufflevector` as `constexpr`. (PR #112129)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 13 18:46:09 PDT 2024
c8ef wrote:
I believe the difference lies in the AST construction. Most built-in functions generate a `CallExpr` AST node, which requires the constant evaluator to check if the function is built-in. However, in this case, Clang emits a `ConvertVector` node directly. Therefore, even if we don't mark it as `constexpr`, we can still evaluate it.
https://github.com/llvm/llvm-project/pull/112129
More information about the cfe-commits
mailing list