@code_native regresion.

125 views
Skip to first unread message

Ismael Venegas Castelló

unread,
Mar 29, 2016, 10:46:17 PM3/29/16
to julia-dev
Should I report this as a bug in a new issue? This works as espected:

root@server1:~# julia5
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+3313 (2016-03-29 15:14 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 5e01b1a (0 days old master)
|__/                   |  x86_64-unknown-linux-gnu

julia> @code_native 1 + 1
        .text
Filename: int.jl
Source line: 0
        pushq   %rbp
        movq    %rsp, %rbp
Source line: 32
        leaq    (%rdi,%rsi), %rax
        popq    %rbp
        retq
        nopw    (%rax,%rax)

julia> versioninfo(true)
Julia Version 0.5.0-dev+3313
Commit 5e01b1a (2016-03-29 15:14 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
  WORD_SIZE: 64
  uname: Linux 4.2.6-1-pve #1 SMP Wed Dec 9 10:49:55 CET 2015 x86_64 unknown
Memory: 188.8544464111328 GB (137796.3203125 MB free)
Uptime: 713062.0 sec
Load Avg:  8.884765625  8.30126953125  8.330078125
Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz:
          speed         user         nice          sys         idle          irq
#1-24  1729 MHz   12770642 s          0 s    2388619 s  1691152789 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, westmere)
Environment:
  TERM = screen
  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  HOME = /root

Package Directory: /root/.julia/v0.5
No packages installed

But just built Julia and I get:

root@server1:~# julia-dev
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+3329 (2016-03-29 22:27 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit a5f2c7a (0 days old master)
|__/                   |  x86_64-linux-gnu

julia> @code_native 1 + 1
        .text
Filename: int.jl
Source line: 0
        pushq   %rbp
        movq    %rsp, %rbp
        pushq   %rbx
        subq    $40, %rsp
        movq    32401512(%rip), %rax
        leaq    -40(%rbp), %rcx
        movq    $0, -24(%rbp)
        movq    $0, -16(%rbp)
        movq    $4, -40(%rbp)
        movq    (%rax), %rdx
        movq    %rdx, -32(%rbp)
        movq    %rcx, (%rax) 
Source line: 32 
        movq    32402611(%rip), %rbx
        movq    32402611(%rip), %rbx
        leaq    (%rdi,%rsi), %rdi
        callq   0xfffffffffff4711f
        movq    %rax, -24(%rbp)
        movq    %rbx, %rdi
        movq    %rax, %rsi
        callq   0xfffffffffff46fb0
        movq    32401436(%rip), %rcx
        movq    %rax, -16(%rbp)
        movq    (%rax), %rax
        movq    -32(%rbp), %rdx
        movq    %rdx, (%rcx)
        addq    $40, %rsp
        popq    %rbx
        popq    %rbp
        retq
        nopw    %cs:(%rax,%rax)

julia> add(x, y) = x + y
add (generic function with 1 method)

julia> @code_native add(1, 1)
        .text
Filename: none
Source line: 0
        pushq   %rbp
        movq    %rsp, %rbp
Source line: 1
        leaq    (%rdi,%rsi), %rax
        popq    %rbp
        retq
        nopw    (%rax,%rax)

julia> versioninfo(true)
Julia Version 0.5.0-dev+3329
Commit a5f2c7a (2016-03-29 22:27 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz
  WORD_SIZE: 64
  uname: Linux 4.2.6-1-pve #1 SMP Wed Dec 9 10:49:55 CET 2015 x86_64 unknown
Memory: 188.8544464111328 GB (138159.8828125 MB free)
Uptime: 713183.0 sec
Load Avg:  3.5283203125  6.55322265625  7.69384765625
Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz:
          speed         user         nice          sys         idle          irq
#1-24  1596 MHz   12807637 s          0 s    2390630 s  1691405139 s          0 s

  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, westmere)
Environment:
  TERM = screen
  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  HOME = /root

Package Directory: /root/.julia/v0.5
No packages installed



Jameson Nash

unread,
Mar 29, 2016, 11:34:14 PM3/29/16
to juli...@googlegroups.com
Yes, it looks like Jeff broke this in #15609

Jeff Bezanson

unread,
Mar 30, 2016, 2:20:38 PM3/30/16
to juli...@googlegroups.com
Good catch; fix on the way.
Reply all
Reply to author
Forward
0 new messages