Skip to content

work around optimisation bugs for rint#116

Merged
ViralBShah merged 1 commit intomasterfrom
sb/opt
Feb 23, 2016
Merged

work around optimisation bugs for rint#116
ViralBShah merged 1 commit intomasterfrom
sb/opt

Conversation

@simonbyrne
Copy link
Copy Markdown
Member

the rint functions (lrint, nearbyint) etc cause problems on ARM and power when compiled with optimisations. This disables optimisations for those functions, and enables them for all others. Also reenables a disable test.

Comment thread Make.inc

default: all

# *int / *intf need to be built with -O0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is true even on x86?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. See the failing test for nearbyint below that I had commented out a while back, and passes as a result of this.

@EdSchouten
Copy link
Copy Markdown
Contributor

What does the optimizer do that causes these tests to fail? Is it a bug in the compiler, or is it a bug in the code?

@simonbyrne
Copy link
Copy Markdown
Member Author

What does the optimizer do that causes these tests to fail? Is it a bug in the compiler, or is it a bug in the code?

I'm not sure exactly, though I suspect it may be due to gcc's poor fenv
support.

@ViralBShah
Copy link
Copy Markdown
Member

Verified on arm.

ViralBShah added a commit that referenced this pull request Feb 23, 2016
work around optimisation bugs for rint
@ViralBShah ViralBShah merged commit 076a1cf into master Feb 23, 2016
@ViralBShah
Copy link
Copy Markdown
Member

@edelsohn mentions that gcc 5 implements much of this right for most targets.

@tkelman tkelman deleted the sb/opt branch February 23, 2016 18:16
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.

4 participants