-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
numbers test failure on 32bit #11654
Comments
Here's the LLVM and asm output julia> @code_llvm Base.Rounding._convert_rounding(Float32, 9007199254740993, RoundUp)
define float @julia__convert_rounding_21203(%jl_value_t*, i64) {
top:
%2 = sitofp i64 %1 to float
%3 = fcmp olt float %2, 0x43E0000000000000
%4 = fptosi float %2 to i64
%5 = icmp slt i64 %4, %1
%6 = and i1 %3, %5
br i1 %6, label %if, label %L
if: ; preds = %top
%7 = call float @julia_nextfloat_20965(float %2, i32 1)
ret float %7
L: ; preds = %top
ret float %2
} julia> @code_native Base.Rounding._convert_rounding(Float32, 9007199254740993, RoundUp)
.text
Filename: rounding.jl
Source line: 0
pushl %ebp
movl %esp, %ebp
subl $40, %esp
movl 12(%ebp), %edx
movl 16(%ebp), %ecx
Source line: 76
movl %ecx, -4(%ebp)
movl %edx, -8(%ebp)
fildll -8(%ebp)
Source line: 77
fnstcw -18(%ebp)
movw -18(%ebp), %ax
movw $3199, -18(%ebp) # imm = 0xC7F
fldcw -18(%ebp)
movw %ax, -18(%ebp)
fld %st(0)
fistpll -16(%ebp)
fldcw -18(%ebp)
flds -836567040
fucomp %st(1)
fnstsw %ax
sahf
jbe L98
cmpl %edx, -16(%ebp)
setae %al
cmpl %ecx, -12(%ebp)
setge %cl
je L78
movb %cl, %al
L78: testb %al, %al
jne L98
fstps (%esp)
movl $1, 4(%esp)
calll 0x13c0a3
L98: addl $40, %esp
popl %ebp
retl |
What's your |
I'll need to have another look at it, but the |
julia> code_llvm(<, Tuple{Float32, Int64})
define i1 @"julia_<_20846"(float, i64) {
top:
%2 = sitofp i64 %1 to float
%3 = fcmp ogt float %2, %0
%4 = fcmp oeq float %2, %0
%5 = fcmp olt float %2, 0x43E0000000000000
%6 = and i1 %4, %5
%7 = fptosi float %2 to i64
%8 = icmp slt i64 %7, %1
%9 = and i1 %6, %8
%10 = or i1 %3, %9
ret i1 %10
} |
BTW, there seems to be a new other failure in this container as well. Should I report them individually?.... |
Just to be sure: you didn't pass |
@nalimilan Build flags are here IIRC, the build fails (or sth similar) if |
openblas is compiled separately in case it looks confusing in |
OK, so that's the same issue as #7185 (among others). You need to build Julia with at least It would make sense to raise an error from the Makefile when |
I see. |
@nalimilan So is #11642 also the same issue? |
I have no idea, but it's really worth retrying with |
@nalimilan Doing that |
@nalimilan It appears to be the same issue. |
Nice to hear! |
This PR should make this less of a trap: #11656 |
I got the following test failure on a 32bit machine.....
Failing case
So it seems that
Float32(9007199254740993, RoundUp)
is not rounding up on 32bit?Version Info is the same with the other 32bit issue I posted
The text was updated successfully, but these errors were encountered: