Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-11-28 01:55:27 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-11-28 01:55:27 +0300
commitee1bb69f2d7c086df72a01632b0563c92896e8b1 (patch)
tree0e385cb3974709bea8dbe1e476f7204ee09959e7
parent7cc30ec6817dec403ec98f1e0da30dfc7473f413 (diff)
Only force auto-vectorization for GCC >= 5.1
-rw-r--r--dnn/nnet_arch.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/dnn/nnet_arch.h b/dnn/nnet_arch.h
index b61ebf54..12a467e5 100644
--- a/dnn/nnet_arch.h
+++ b/dnn/nnet_arch.h
@@ -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