Only force auto-vectorization for GCC >= 5.1

This commit is contained in:
Jean-Marc Valin 2023-11-27 17:55:27 -05:00
parent 7cc30ec681
commit ee1bb69f2d
No known key found for this signature in database
GPG key ID: 531A52533318F00A

View file

@ -40,7 +40,8 @@
/* Force vectorization on for DNN code because some of the loops rely on
compiler vectorization rather than explicitly using intrinsics. */
#ifdef __GNUC__
#if OPUS_GNUC_PREREQ(5,1)
#define GCC_POP_OPTIONS
#pragma GCC push_options
#pragma GCC optimize("tree-vectorize")
#endif
@ -223,7 +224,7 @@ void RTCD_SUF(compute_conv2d_)(const Conv2dLayer *conv, float *out, float *mem,
}
}
#ifdef __GNUC__
#ifdef GCC_POP_OPTIONS
#pragma GCC pop_options
#endif