Skip to content

IRGen/objc_simd.sil #16

Open
Open
@modocache

Description

@modocache
******************** TEST 'Swift :: IRGen/objc_simd.sil' FAILED ********************
Script:
--
/home/modocache/GitHub/apple/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift -frontend -target armv7-none-linux-androideabi -sdk /home/modocache/android-ndk-r10e/platforms/android-16/arch-arm   -enable-source-import -sdk '/home/modocache/GitHub/apple/swift/test'/Inputs/clang-importer-sdk -I '/home/modocache/GitHub/apple/swift/test'/Inputs/clang-importer-sdk/swift-modules   -emit-ir /home/modocache/GitHub/apple/swift/test/IRGen/objc_simd.sil | FileCheck /home/modocache/GitHub/apple/swift/test/IRGen/objc_simd.sil --check-prefix=armv7
--
Exit Code: 1

Command Output (stderr):
--
/home/modocache/GitHub/apple/swift/test/IRGen/objc_simd.sil:34:17: error: expected string not found in input
// armv7-LABEL: define <3 x float> @simd_c_args_float3(<4 x i32>)
                ^
<stdin>:12:46: note: scanning from here
define <4 x float> @simd_c_args(<4 x float>) #0 {
                                             ^
<stdin>:54:1: note: possible intended match here
define <3 x float> @simd_c_args_float3(<3 x float>) #0 {
^

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):

diff --git a/test/lit.cfg b/test/lit.cfg
index cbc3277..4c84e2e 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -503,8 +503,7 @@ if run_vendor == 'apple':
         (config.variant_triple, stdlib_resource_dir_opt, mcp_opt))
     target_options_for_mock_sdk_after = sdk_overlay_dir_opt

-    if 'arm' in run_cpu and swift_test_mode != 'non_executable':
-        raise RuntimeError('Device tests are not currently supported.')

     if 'arm' in run_cpu:
        # iOS/tvOS/watchOS device
swift $ ../llvm/utils/lit/lit.py -v ../build/Ninja-ReleaseAssert/swift-macosx-x86_64/test-iphoneos-armv7/IRGen/objc_simd.sil
lit.py: lit.cfg:249: note: using swift: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift
lit.py: lit.cfg:249: note: using swiftc: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc
lit.py: lit.cfg:249: note: using sil-opt: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/sil-opt
lit.py: lit.cfg:249: note: using sil-extract: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/sil-extract
lit.py: lit.cfg:249: note: using lldb-moduleimport-test: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/lldb-moduleimport-test
lit.py: lit.cfg:249: note: using swift-ide-test: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift-ide-test
lit.py: lit.cfg:249: note: using swift-reflection-test: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift-reflection-test
lit.py: lit.cfg:249: note: using clang: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/bin/clang
lit.py: lit.cfg:249: note: using llvm-link: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/bin/llvm-link
lit.py: lit.cfg:249: note: using swift-llvm-opt: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift-llvm-opt
lit.py: lit.cfg:290: note: Using resource dir: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift
lit.py: lit.cfg:316: note: Using Clang module cache: /var/folders/ry/2ryfdsb56b30092626qprw6d3rb3ss/T/swift-testsuite-clang-module-cachevjTIdD
lit.py: lit.cfg:320: note: Using code completion cache: /var/folders/ry/2ryfdsb56b30092626qprw6d3rb3ss/T/swift-testsuite-completion-cacheuAPXjd
lit.py: lit.cfg:511: note: Testing iOS armv7-apple-ios7.0
lit.py: lit.cfg:622: note: Running tests on iPhone OS version 9.2 (13C75)
lit.py: lit.cfg:801: note: Using platform module dir: /Users/bgesiak/GitHub/apple/build/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/%target-sdk-name/armv7
-- Testing: 1 tests, 1 threads --
PASS: Swift :: IRGen/objc_simd.sil (1 of 1)
Testing Time: 0.05s
  Expected Passes    : 1

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 for linux-armv7 as well.

So why does simd behave differently on android-armv7?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions