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

[SR-9986] Test - IRGen/pic.swift failing on AArch64 #52390

Open
futurejones opened this issue Feb 23, 2019 · 3 comments
Open

[SR-9986] Test - IRGen/pic.swift failing on AArch64 #52390

futurejones opened this issue Feb 23, 2019 · 3 comments
Labels
arm64 Architecture: arm64 (aarch64) — any 64-bit ARM bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux

Comments

@futurejones
Copy link
Contributor

Previous ID SR-9986
Radar None
Original Reporter @futurejones
Type Bug
Environment

Linux Ubuntu 16.04 LTS on AArch64

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Linux, Test, aarch64
Assignee None
Priority Medium

md5: 3f57543657dc35089583afc2202407fb

Issue Description:

Test - Swift(linux-aarch64) :: IRGen/pic.swift is failing on 4.2.2, 5.0 and master.

******************** TEST 'Swift(linux-aarch64) :: IRGen/pic.swift' FAILED ********************
Script:
--
: 'RUN: at line 4';   /home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/build/buildbot_linux/swift-linux-aarch64/bin/swift -frontend -target aarch64-unknown-linux-gnu  -module-cache-path '/home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/build/buildbot_linux/swift-linux-aarch64/swift-test-results/aarch64-unknown-linux-gnu/clang-module-cache' -swift-version 4  -assume-parsing-unqualified-ownership-sil /home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/swift/test/IRGen/pic.swift -module-name main -S -o - | /home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/swift/utils/PathSanitizingFileCheck --sanitize 'BUILD_DIR=/home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/build/buildbot_linux/swift-linux-aarch64' --sanitize 'SOURCE_DIR=/home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/swift' --use-filecheck '/home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/build/buildbot_linux/llvm-linux-aarch64/bin/FileCheck' -check-prefix=aarch64 /home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/swift/test/IRGen/pic.swift
--
Exit Code: 1

Command Output (stderr):
--
/home/worksonarm_test/jenkins_slave/workspace/swift-5.0-aarch64/swift/test/IRGen/pic.swift:56:13: error: aarch64: expected string not found in input
// aarch64: adrp [[REG1:x[0-9]+]], ($s4main6globalSivp@PAGE)
            ^
<stdin>:24:2: note: scanning from here
.cfi_startproc
^
<stdin>:31:2: note: possible intended match here
adrp x8, ($s4main6globalSivp)
^

--

********************
@futurejones
Copy link
Contributor Author

A fix for this was submitted and merged but the test is still failing.

#19866

// aarch64-LABEL: $s4main10use_globalSiyF:
// aarch64:        adrp [[REG1:x[0-9]+]], ($s4main6globalSivp@PAGE)
// aarch64:        add [[REG1]], [[REG1]], :lo12:($s4main6globalSivp)
// aarch64:        bl swift_beginAccess
// aarch64:        ldr [[REG2:x[0-9]+]], {{\[}}[[REG1]]{{\]}}
// aarch64:        str [[REG2]], [sp]
// aarch64:        bl swift_endAccess
// aarch64:        ldr x0, [sp]

If you remove "@page" in line 2 the test passes

-// aarch64:        adrp [[REG1:x[0-9]+]], ($s4main6globalSivp@PAGE)
+// aarch64:        adrp [[REG1:x[0-9]+]], ($s4main6globalSivp)

But I don't know enough about this to know if this fix is correct.

@belkadan
Copy link
Contributor

cc @rjmccall

@rjmccall
Copy link
Member

I think that's just a target-specific assembler difference: Darwin's assembler calls out the fact that the operand isn't actually the full offset to the label, just the page offset, but armasm doesn't. So a fix to accept either should be fine.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Architecture: arm64 (aarch64) — any 64-bit ARM bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux
Projects
None yet
Development

No branches or pull requests

3 participants