-
Notifications
You must be signed in to change notification settings - Fork 32
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
IRGen/objc_simd.sil #16
Comments
That's right, I've never noticed that this test fails. I can't promise that it runs, however. My first thought goes back to the recent discussion about softfloat on android. I don't know much about android, but if it's using floating point emulation, I could see that it would implement this as a vector of floats to better match other environments. Whereas on linux-armv7, SIMD is supported (I believe), but is likely limited by the actual hardware implementation. The NEON unit is a 128-bit SMID system, so the 4x32 vectors make sense, but what doesn't make sense to me in the linux-armv7 case is the use of i32 types. Disclaimer: I could be completely full of it, this is just a guess. |
Thanks, @hpux735! I'm still investigating. One theory I'm bouncing around after reading this article: I know that different CPU vendors have different implementations of SIMD, such as MMX, AltiVec, 3DNow, SSE, and NEON. ARM uses NEON, whereas Intel processors use MMX. Is it possible these explain the discrepancies in this test? But again, I'm stumped, since Linux ARM, which I suppose uses NEON, should have the same discrepancy.
@hpux735, would it be possible for you to check whether this test is an XFAIL or UNSUPPORTED on Linux ARM? You should be able to do so using:
|
@modocache Very interesting, loved the link. I certainly do think it's possible that the discrepancies could be related to those differences. Also, I agree that it should be the same. I tried that test, and it is run and passes on linux-armv7. Have you looked at its includes (does it include simd.h)? I wonder if there is a test in there that isn't matching correctly in armv7-android and is choosing a different set of intrinsics (or software fall-back). |
This failure still occurs on apple/swift master. I'm working on migrating this GitHub issue into a Swift JIRA task. |
@modocache @hpux735 do either of you have experience using explicit SIMD instructions in Swift on non-Apple platforms? I was just working on our bandpass filterbank today and got it performing even faster than the Accelerate framework when I saw somewhere (maybe this thread) that LLVM'a builtin SIMD intrinsics are available in the stdlib but they don't seem to be exposed beyond that. Any ideas? |
The problem is that
android-armv7
has@simd_c_args_float3
take an argument of<3 x float>
, like the x86_64 check expects. But the check for armv7 expects<4 x i32>
for some reason.Running the tests for iphoneos-armv7 works (once you remove this pesky warning from the lit config):
In other words, it looks like the
armv7
check works for most platforms. @hpux735 never mentions it in his lists of failing tests, so I'm assuming this works forlinux-armv7
as well.So why does simd behave differently on
android-armv7
?The text was updated successfully, but these errors were encountered: