[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - Allow AVX/AVX512 IFMA madd52 intrinsics to be used in constexpr (PR #161056)
NagaChaitanya Vellanki via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 05:00:57 PDT 2025
================
@@ -8,53 +8,221 @@
// RUN: %clang_cc1 -x c++ -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avxifma -emit-llvm -o - -Wall -Werror -fexperimental-new-constant-interpreter | FileCheck %s
// RUN: %clang_cc1 -x c++ -ffreestanding %s -triple=i386-apple-darwin -target-feature +avxifma -emit-llvm -o - -Wall -Werror -fexperimental-new-constant-interpreter | FileCheck %s
-
#include <immintrin.h>
+#include "builtin_test_helpers.h"
+
+__attribute__((target("avx512ifma,avx512vl")))
----------------
chaitanyav wrote:
```bash
+ /mnt/f/llvm-project/build/bin/FileCheck /mnt/f/llvm-project/clang/test/CodeGen/X86/avxifma-builtins.c
/mnt/f/llvm-project/clang/test/CodeGen/X86/avxifma-builtins.c:18:10: error: always_inline function '_mm_madd52hi_epu64' requires target feature 'avx512ifma', but would be inlined into function 'test_mm_madd52hi_epu64' that is compiled without support for 'avx512ifma'
18 | return _mm_madd52hi_epu64(__X, __Y, __Z);
| ^
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line: /mnt/f/llvm-project/build/bin/FileCheck /mnt/f/llvm-project/clang/test/CodeGen/X86/avxifma-builtins.c
```
https://github.com/llvm/llvm-project/pull/161056
More information about the cfe-commits
mailing list