mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 14:05:49 -04:00

Summary: According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if the hardware floating-point architecture supports fused floating-point multiply-accumulate". This changes clang's behaviour from emitting this macro for v7-A and v7-R cores to only emitting it when the target has VFPv4 (and therefore support for the floating point multiply-accumulate instruction). Fixes PR27216 Reviewers: t.p.northover, rengolin Subscribers: aemerson, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D18963 llvm-svn: 267869
13 lines
352 B
C
13 lines
352 B
C
// RUN: %clang_cc1 -triple thumbv7-none-eabi -target-feature +neon -target-feature +vfp4 -fsyntax-only -verify %s
|
|
#include <arm_neon.h>
|
|
|
|
// expected-no-diagnostics
|
|
|
|
void func(float32x2_t v2f32, float32x4_t v4f32) {
|
|
vfma_f32(v2f32, v2f32, v2f32);
|
|
vfmaq_f32(v4f32, v4f32, v4f32);
|
|
|
|
vfms_f32(v2f32, v2f32, v2f32);
|
|
vfmsq_f32(v4f32, v4f32, v4f32);
|
|
}
|