mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Fix EIGEN_OPTIMIZATION_BARRIER for arm-clang.
Clang doesn't like !621, needs the "g" constraint back. The "g" constraint also works for GCC >= 5. This fixes our gitlab CI.
This commit is contained in:
parent
a443a2373f
commit
3a6296d4f1
@ -1131,7 +1131,16 @@ namespace Eigen {
|
||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,v,wa" (X));
|
||||
#elif EIGEN_ARCH_ARM_OR_ARM64
|
||||
// General, NEON.
|
||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,w" (X));
|
||||
// Clang doesn't like "r",
|
||||
// error: non-trivial scalar-to-vector conversion, possible invalid
|
||||
// constraint for vector type
|
||||
// GCC < 5 doesn't like "g",
|
||||
// error: 'asm' operand requires impossible reload
|
||||
#if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_MOST(5, 0)
|
||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,w" (X));
|
||||
#else
|
||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,w" (X));
|
||||
#endif
|
||||
#elif EIGEN_ARCH_i386_OR_x86_64
|
||||
// General, SSE.
|
||||
#define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,x" (X));
|
||||
|
Loading…
Reference in New Issue
Block a user