LLVMTypeRef type = LLVMTypeOf(a);
assert(type == LLVMTypeOf(b));
assert(type == LLVMTypeOf(c));
+ if (HAVE_LLVM < 0x0304) {
+ /* XXX: LLVM 3.3 does not breakdown llvm.fmuladd into mul+add when FMA is
+ * not supported, and instead it falls-back to a C function.
+ */
+ return LLVMBuildFAdd(builder, LLVMBuildFMul(builder, a, b, ""), c, "");
+ }
char intrinsic[32];
lp_format_intrinsic(intrinsic, sizeof intrinsic, "llvm.fmuladd", type);
LLVMValueRef args[] = { a, b, c };
*/
MAttrs.push_back(util_cpu_caps.has_avx ? "+avx" : "-avx");
MAttrs.push_back(util_cpu_caps.has_f16c ? "+f16c" : "-f16c");
- if (HAVE_LLVM >= 0x0304 || useMCJIT) {
+ if (HAVE_LLVM >= 0x0304) {
MAttrs.push_back(util_cpu_caps.has_fma ? "+fma" : "-fma");
} else {
/*