Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform aarch64, cannot initialize paramter of float32x4_t with __m128d #587

Closed
mexuaz opened this issue Feb 17, 2023 · 2 comments
Closed

Comments

@mexuaz
Copy link

mexuaz commented Feb 17, 2023

Clang 14.0.7 (Android NDK 25.2) produces the following error when cross-compiling from Ubuntu 22 for the aarch64 target.

sse2neon.h:5457:33: error: cannot initialize a parameter of type 'float32x4_t' (vector of 4 'float32_t' values) with an lvalue of type '__m128d' (aka 'float64x2_t')
      __builtin_nontemporal_store(a, (float32x4_t *) p);

@jserv
Copy link
Member

jserv commented Feb 17, 2023

I managed to build SSE2NEON on Aarch64/Linux.

$ clang++-15 -v
Ubuntu clang version 15.0.6
Target: aarch64-unknown-linux-gnu
$ make CXX=clang++-15
clang++-15 -o tests/common.o -Wall -Wcast-qual -I. -march=armv8-a+fp+simd -std=gnu++14 -c -MMD -MF tests/common.o.d tests/common.cpp
clang++-15 -o tests/impl.o -Wall -Wcast-qual -I. -march=armv8-a+fp+simd -std=gnu++14 -c -MMD -MF tests/impl.o.d tests/impl.cpp
clang++-15 -o tests/main.o -Wall -Wcast-qual -I. -march=armv8-a+fp+simd -std=gnu++14 -c -MMD -MF tests/main.o.d tests/main.cpp
clang++-15 -lm -o tests/main tests/binding.o tests/common.o tests/impl.o tests/main.o

It succeeded. However, when option -flax-vector-conversions is passed to clang, I got the same errors:

./sse2neon.h:5457:33: error: cannot initialize a parameter of type 'float32x4_t' (vector of 4 'float32_t' values) with an lvalue of type '__m128d' (aka 'float64x2_t')
    __builtin_nontemporal_store(a, (float32x4_t *) p);
                                ^
1 error generated.

One possible solution is to get rid of option -flax-vector-conversions.

@jserv
Copy link
Member

jserv commented Feb 17, 2023

Duplicated: #571

@jserv jserv closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants