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

test our implementations against gcc_s #67

Merged
merged 6 commits into from
Sep 22, 2016
Merged

test our implementations against gcc_s #67

merged 6 commits into from
Sep 22, 2016

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 16, 2016

if it exposes the same intrinsics that we implement -- gcc_s doesn't
implement all the intrinsics for all the architectures.

closes #65

r? @Amanieu
Tested on Linux x86_64 and against the x86_64 and the arm-gnueabi targets. Unclear whether this works on osx or windows.

if it exposes the same intrinsics that we implement -- gcc_s doesn't
implement all the intrinsics for all the architectures.

closes #65
@japaric
Copy link
Member Author

japaric commented Sep 16, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 9493c37 with merge 9493c37...

@homunkulus
Copy link
Contributor

💔 Test failed - status-appveyor

@japaric
Copy link
Member Author

japaric commented Sep 18, 2016

@homunkulus try

1 similar comment
@japaric
Copy link
Member Author

japaric commented Sep 18, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 7380d0f with merge 7380d0f...

@homunkulus
Copy link
Contributor

💔 Test failed - status-appveyor

@japaric
Copy link
Member Author

japaric commented Sep 18, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 08c9ff7 with merge 08c9ff7...

@homunkulus
Copy link
Contributor

💔 Test failed - status-travis

@japaric
Copy link
Member Author

japaric commented Sep 18, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 225d4c9 with merge 225d4c9...

@homunkulus
Copy link
Contributor

💔 Test failed - status-travis

@japaric
Copy link
Member Author

japaric commented Sep 21, 2016

re: the add*sf3 failures on hard float arm

I think the gcc_s implementation of these intrinsics for hard float arm may be wrong (?). Our implementation vs native operations passes the unit tests and our implementation vs the gcc_s implementation of these intrinsics but for soft float arm also passes the unit tests ... So I don't know what else could explain these results.

Jorge Aparicio added 2 commits September 21, 2016 21:14
instead test half of the time against gcc_s and the other half test
against the native operation (\*).

(\*) Not all the targets have available a native version of the
intrinsics under test. On those targets we'll end up testing our
implementation against itself half of the time. This is not much of a
problem because we do several quickcheck runs per intrinsic.
@japaric
Copy link
Member Author

japaric commented Sep 22, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 384c48c with merge 384c48c...

@homunkulus
Copy link
Contributor

💔 Test failed - status-appveyor

we don't want to match musleabihf targets
@japaric
Copy link
Member Author

japaric commented Sep 22, 2016

@mattico @Amanieu could either of you, please, review this PR?

@mattico
Copy link
Contributor

mattico commented Sep 22, 2016

The changes look good to me!

It does seem like there could be a better solution to testing all of these intrinsics using some sort of custom testing harness, but that can wait for a later PR of course. I'm starting to brainstorm ideas for this.

It'd be nice to have results like:

target: thumbv6m-none-eabi

Testing 123 intrinsics...
test muldi ... ok
test mulosi ... ok
test mulodi ... ok
test divdi3 ... ERROR
  input: (-1, INT_MAX)
  results:
    compiler-rt:       32768
    gcc_s:             32768
    compiler-builtins: 32767
test udivmoddi4 ... ERROR
  input: (25, 367)
  results:
    compiler-rt:       3
    gcc_s:             N/A
    compiler-builtins: 365

...

target: thumbv6m-none-eabi

Benchmarking 123 intrinsics...
bench muldi...
  compiler-rt:       16,386 ns/iter (+- 366)
  gcc_s:             14,375 ns/iter (+- 540)
  compiler-builtins: 17,690 ns/iter (+- 750)
bench mulosi...
...

Values made up, of course.

@japaric
Copy link
Member Author

japaric commented Sep 22, 2016

Thanks for taking a look @mattico! I'm going to (@homunkulus r+) this.

re: a custom test harness. Love the idea! In particular, benchmarking is something important that we are missing. Could you open an issue for it so it doesn't get lost? Thanks!

@japaric
Copy link
Member Author

japaric commented Sep 22, 2016

@homunkulus r+

I said ...

@homunkulus
Copy link
Contributor

📌 Commit dafe47b has been approved by japaric

@homunkulus
Copy link
Contributor

⌛ Testing commit dafe47b with merge b46719e...

japaric pushed a commit that referenced this pull request Sep 22, 2016
test our implementations against gcc_s

if it exposes the same intrinsics that we implement -- gcc_s doesn't
implement all the intrinsics for all the architectures.

closes #65

r? @Amanieu
Tested on Linux x86_64 and against the x86_64 and the arm-gnueabi targets. Unclear whether this works on osx or windows.
@homunkulus
Copy link
Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: japaric
Pushing b46719e to master...

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

Successfully merging this pull request may close these issues.

Test our implementations against libgcc
3 participants