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

eqfui odd inconsistency #9085

Closed
ihnorton opened this issue Nov 20, 2014 · 2 comments
Closed

eqfui odd inconsistency #9085

ihnorton opened this issue Nov 20, 2014 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@ihnorton
Copy link
Member

This came up in #8402. There seems to be an inconsistency between eqfui results at the toplevel vs. in a function. This does appear to be fixed in llvm-svn. But, it seems odd enough to deserve its own issue (or perhaps there is some explanation that will help me figure out the failure on ARM -- and the fact that the result there is inverted).

On linux and windows x86_64/llvm3.3 builds (on both master and 0.3.2), I see the following:

julia> typemax(UInt64) != 2.0^64
true
julia> f() = typemax(UInt64) != 2.0^64
f (generic function with 1 method)
julia> f()
false

We assert the first result in a numbers test, so presumably the same should hold inside of a function...

The IR for julia_!=... is identical on all platforms / llvm versions:
julia> @code_llvm typemax(Uint64) != 2.0^64

define i1 @"julia_!=41538"(i64, double) {
top:
  %2 = uitofp i64 %0 to double, !dbg !8
  %3 = fptoui double %2 to i64, !dbg !8
  %notlhs = fcmp une double %2, %1, !dbg !8
  %notrhs = icmp ne i64 %3, %0, !dbg !8
  %4 = or i1 %notlhs, %notrhs, !dbg !8
  ret i1 %4, !dbg !8
}

(the comparison is folded to a bool for the function version)

@JeffBezanson JeffBezanson added bug Indicates an unexpected problem or unintended behavior upstream The issue is with an upstream dependency, e.g. LLVM labels Nov 21, 2014
@PallHaraldsson
Copy link
Contributor

Just came from #8402 that is closed. If it depended on this and already fixed should this be closed?

@ihnorton
Copy link
Member Author

No. This depends on LLVM3.5/6/7 upgrade. As tagged.

On Fri, May 15, 2015 at 3:17 PM, Páll Haraldsson [email protected]
wrote:

Just came from #8402 #8402
that is closed. If it depended on this and already fixed should this be
closed?


Reply to this email directly or view it on GitHub
#9085 (comment).

tkelman added a commit to tkelman/julia that referenced this issue Jan 31, 2016
this may actually have been worked around by JuliaLang#14520, not sure
tkelman added a commit that referenced this issue Jan 31, 2016
this may actually have been worked around by #14520, not sure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

3 participants