mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-09 22:51:51 +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. (cherry picked from commit 3a6296d4f198ffbcccda4303919b3b14d5e54524)
This commit is contained in:
parent
4ef67cbfb2
commit
07cc362238
@ -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…
x
Reference in New Issue
Block a user