1. 29 Aug, 2019 15 commits
  2. 28 Aug, 2019 25 commits
    • Dmitri Shuralyov's avatar
      CONTRIBUTORS: second round of updates for Go 1.13 · d0eaec79
      Dmitri Shuralyov authored
      This update has been automatically generated using the updatecontrib
      command:
      
      	cd gotip
      	go run golang.org/x/build/cmd/updatecontrib
      
      With minor manual changes based on publicly available information
      to canonicalize letter case for a few names.
      
      Actions taken (relative to CONTRIBUTORS at origin/master):
      
      	Added Albert Teoh <albert.teoh@gmail.com>
      	Added Allen Li <ayatane@google.com>
      	Added Anderson Queiroz <contato@andersonq.eti.br>
      	Added Andrew Todd <andrew.todd@wework.com>
      	Added Artem Kolin <artemkaxboy@gmail.com>
      	Added Bharath Thiruveedula <tbharath91@gmail.com>
      	Added Christian Muehlhaeuser <muesli@gmail.com>
      	Added Darren McCleary <darren.rmc@gmail.com>
      	Added David Finkel <david.finkel@gmail.com>
      	Added Eddie Scholtz <escholtz@google.com>
      	Added GitHub User tatsumack (4510569) <tatsu.mack@gmail.com>
      	Added GitHub User utkarsh-extc (53217283) <53217283+utkarsh-extc@users.noreply.github.com>
      	Added GitHub User yuanhh (1298735) <yuan415030@gmail.com>
      	Added Illya Yalovyy <yalovoy@gmail.com>
      	Added James Eady <jmeady@google.com>
      	Added Jan Steinke <jan.steinke@gmail.com>
      	Added Javier Revillas <jrevillas@massivedynamic.io>
      	Added Jordi Martin <jordimartin@gmail.com>
      	Added Jorge Araya <jorgejavieran@yahoo.com.mx>
      	Added Kelly Heller <pestophagous@gmail.com>
      	Added Kevin Gillette <extemporalgenome@gmail.com>
      	Added Mark Glines <mark@glines.org>
      	Added Nao Yonashiro <owan.orisano@gmail.com>
      	Added Pascal Dierich <pascal@pascaldierich.com>
      	Added Pure White <wu.purewhite@gmail.com>
      	Added Sam Arnold <sarnold64@bloomberg.net>
      	Added Sander van Harmelen <sander@vanharmelen.nl>
      	Added Sergei Zagurskii <gvozdoder@gmail.com>
      	Added Shivani Singhal <shivani.singhal2804@gmail.com>
      	Added Stefan Baebler <sbaebler@outbrain.com>
      	Added Tianon Gravi <admwiggin@gmail.com>
      	Added Toshihiro Shiino <shiino.toshihiro@gmail.com>
      	Added Wagner Riffel <wgrriffel@gmail.com>
      	Used GitHub User tatsumack (4510569) form for tatsumack <tatsu.mack@gmail.com> https://github.com/golang/website/commit/7eeb7ef [website]
      	Used GitHub User utkarsh-extc (53217283) form for utkarsh-extc <53217283+utkarsh-extc@users.noreply.github.com> https://github.com/golang/sys/commit/51ab0e2 [sys]
      	Used GitHub User yuanhh (1298735) form for yuanhh <yuan415030@gmail.com> https://github.com/golang/crypto/commit/60c769a [crypto]
      	Used GitHub name "Akhil Indurti" for smasher164 <aindurti@gmail.com> https://github.com/golang/go/commit/5ca44dc403 [build exp go sys]
      	Used GitHub name "Artem Kolin" for artemkaxboy <artemkaxboy@gmail.com> https://github.com/golang/go/commit/e881604d1c [go]
      	Used GitHub name "Ivan Markin" for nogoegst <nogoegst@users.noreply.github.com> https://github.com/golang/go/commit/a1addf15df [go]
      	Used GitHub name "Keiji Yoshida" for yosssi <yoshida.keiji.84@gmail.com> https://github.com/golang/lint/commit/ac6833c [lint]
      	Used GitHub name "Michalis Kargakis" for kargakis <mkargaki@redhat.com> https://github.com/golang/go/commit/e243d242d7 [go]
      	Used GitHub name "Roberto Clapis" for Roberto <empijei@users.noreply.github.com> https://github.com/golang/go/commit/963776e689 [go]
      	Used GitHub name "Robin Eklind" for mewmew <rnd0x00@gmail.com> https://github.com/golang/go/commit/b8620afb8d [blog go proposal.git]
      
      Updates #12042
      
      Change-Id: I1b21a18138849c537048558dd4324a823ba12a14
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192099Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
      Run-TryBot: Andrew Bonventre <andybons@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d0eaec79
    • Cherry Zhang's avatar
      test/codegen: fix ARM32 RotateLeft32 test · 9859f6be
      Cherry Zhang authored
      The syntax of a shifted operation does not have a "$" sign for
      the shift amount. Remove it.
      
      Change-Id: I50782fe942b640076f48c2fafea4d3175be8ff99
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192100
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      9859f6be
    • Matthew Dempsky's avatar
      Revert "cmd/compile: make isfat handle 1-element array, 1-field struct" · 777304a5
      Matthew Dempsky authored
      This reverts commit 53227762.
      
      Reason for revert: broke js-wasm builder.
      
      Change-Id: If22762317c4a9e00f5060eb84377a4a52d601fca
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192157
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      777304a5
    • Matthew Dempsky's avatar
      cmd/compile: update fmt_test.go for esc.go code cleanup · aced50af
      Matthew Dempsky authored
      CL 187598 removed a bunch of esc.go's debug messages, so some format
      strings are no longer needed.
      
      Fixes #33915.
      
      Change-Id: Iaadf12b5d68358e1abb00210f5aa8be01b36ce82
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192142
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      aced50af
    • LE Manh Cuong's avatar
      cmd/compile: make isfat handle 1-element array, 1-field struct · 53227762
      LE Manh Cuong authored
      This will improve liveness analysis slightly, the same logic as
      isdirectiface curently does. In:
      
      	type T struct {
      	    m map[int]int
      	}
      
              v := T{}
              v.m = make(map[int]int)
      
      T is considered "fat", now it is not. So assigning to v.m is considered
      to clobber the entire v.
      
      This is follow up of CL 179057.
      
      Change-Id: Id6b4807b8e8521ef5d8bcb14fedb6dceb9dbf18c
      Reviewed-on: https://go-review.googlesource.com/c/go/+/179578
      Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      53227762
    • LE Manh Cuong's avatar
      cmd/compile: remove isfat from order expr · 515bb012
      LE Manh Cuong authored
      isfat was removed in walkexpr in CL 32313. For consistency,
      remove it from order expr, too.
      
      Change-Id: I0a47e0da13ba0168d6a055d990b8efad26ad790d
      Reviewed-on: https://go-review.googlesource.com/c/go/+/179057
      Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      515bb012
    • Cholerae Hu's avatar
      cmd/compile: truncate constant arithmetic result with typed complex numbers · 52cff701
      Cholerae Hu authored
      Fixes #33285
      
      Change-Id: Idd125e3342058051216be3f105330aef987320c3
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187697
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      52cff701
    • LE Manh Cuong's avatar
      cmd/compile: ensure interface-to-concrete comparison panics when it should · 25ebf015
      LE Manh Cuong authored
      In interface-to-concrete comparisons, we are short circuiting on the interface
      value's dynamic type before evaluating the concrete expression for side effects,
      causing concrete expression won't panic at runtime, while it should.
      
      To fix it, evaluating the RHS of comparison before we do the short-circuit.
      
      We also want to prioritize panics in the LHS over the RHS, so evaluating
      the LHS too.
      
      Fixes #32187
      
      Change-Id: I15b58a523491b7fd1856b8fdb9ba0cba5d11ebb4
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178817
      Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      25ebf015
    • LE Manh Cuong's avatar
      cmd/compile: fix wrong field type in scasetype · 400d0212
      LE Manh Cuong authored
      The only place set releasetime to negative is in runtime.selectgo
      (when blockprofilerate greater than zero), so we are safe in compiler
      code.
      
      But scasetype must keep in sync with runtime/select.go scase struct, so
      releasetime must be int64.
      
      Change-Id: I39ea944f5f2872452d3ffd57f7604d51e0d2590a
      Reviewed-on: https://go-review.googlesource.com/c/go/+/179799
      Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      400d0212
    • Matthew Dempsky's avatar
      cmd/compile: remove unused code from esc.go · 0b9b152e
      Matthew Dempsky authored
      Change-Id: Idb7b97ced559c40d4e3beae5c661c71825200af7
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187598Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      0b9b152e
    • Matthew Dempsky's avatar
      cmd/compile: remove -newescape flag · 991b0fd4
      Matthew Dempsky authored
      Drops support for old escape analysis pass. Subsequent, separate CL
      will remove dead code.
      
      While here, fix a minor error in fmt.go: it was still looking for
      esc.go's NodeEscState in n.Opt() rather than escape.go's EscLocation.
      But this only affected debug diagnostics printed during escape
      analysis itself.
      
      Change-Id: I62512e1b31c75ba0577550a5fd7824abc3159ed5
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187597Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      991b0fd4
    • Matthew Dempsky's avatar
      test: remove -newescape from regress tests · 501b786e
      Matthew Dempsky authored
      Prep for subsequent CLs to remove old escape analysis pass.
      
      This CL removes -newescape=true from tests that use it, and deletes
      tests that use -newescape=false. (For history, see CL 170447.)
      
      Notably, this removes escape_because.go without any replacement, but
      this is being tracked by #31489.
      
      Change-Id: I6f6058d58fff2c5d210cb1d2713200cc9f501ca7
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187617
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      501b786e
    • Brad Fitzpatrick's avatar
      net/http: don't panic serving dir in ServeFile with empty Request.URL.Path · 7ed973b4
      Brad Fitzpatrick authored
      Updates #30165
      Updates #31622
      
      Change-Id: I7a4b91aa7c5c3af8c0b1273cbb42046feddf7d78
      Reviewed-on: https://go-review.googlesource.com/c/go/+/180499Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7ed973b4
    • Ayan George's avatar
      runtime: simplify GOOS detection in mstart() · b3a1205a
      Ayan George authored
      The existing condition is long and repetitive.  Using select/case with
      multiple values in the expression list is more concise and clearer.
      
      Change-Id: I43f8abcf958e433468728f1d89ff1436332b29da
      Reviewed-on: https://go-review.googlesource.com/c/go/+/188519Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b3a1205a
    • Ian Lance Taylor's avatar
      test: add test that failed with gccgo · 47575187
      Ian Lance Taylor authored
      Updates #33739
      
      Change-Id: Ib7ce4bc51972fe49998f37f6e27baa6a2a036d5e
      Reviewed-on: https://go-review.googlesource.com/c/go/+/191001Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      47575187
    • Jordi Martin's avatar
      io: add error check on pipe close functions to avoid error overwriting · f45eb9ff
      Jordi Martin authored
      The current implementation allows multiple calls `Close` and `CloseWithError` in every side of the pipe, as a result, the original error can be overwritten.
      
      This CL fixes this behavior adding an error existence check on `atomicError` type
      and keeping the first error still available.
      
      Fixes #24283
      
      Change-Id: Iefe8f758aeb775309424365f8177511062514150
      GitHub-Last-Rev: b559540d7af3a0dad423816b695525ac2d6bd864
      GitHub-Pull-Request: golang/go#33239
      Reviewed-on: https://go-review.googlesource.com/c/go/+/187197Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f45eb9ff
    • empijei's avatar
      crypto/x509: allow nil Certificates to be compared in Equal · 89865f8b
      empijei authored
      The current implementation panics on nil certificates,
      so introduce a nil check and early return true if both
      are nil, false if only one is.
      
      Fixes #28743
      
      Change-Id: I71b0dee3e505d3ad562a4470ccc22c3a2579bc52
      Reviewed-on: https://go-review.googlesource.com/c/go/+/167118
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      89865f8b
    • Mostyn Bramley-Moore's avatar
      crypto/ecdsa: improve documentation readability · 84198445
      Mostyn Bramley-Moore authored
      Include references in the package-level comment block, expand
      the obscure IRO acronym, and add a reference for "the standard
      (cryptographic) assumptions".
      
      Fixes #33589
      
      Change-Id: I76c3b0a2f7258b3ab4bf1c8e7681c5d159720a20
      GitHub-Last-Rev: 30d5a1e2fbbbb577ccc819f5ef80d5238565c9f3
      GitHub-Pull-Request: golang/go#33723
      Reviewed-on: https://go-review.googlesource.com/c/go/+/190840Reviewed-by: default avatarFilippo Valsorda <filippo@golang.org>
      84198445
    • Eric Lagergren's avatar
      math/big: document that Rat.Denom might modify the receiver · 9dfa4cb0
      Eric Lagergren authored
      Fixes #33792
      
      Change-Id: I306a95883c3db2d674d3294a6feb50adc50ee5d6
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192017Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      9dfa4cb0
    • Meng Zhuo's avatar
      runtime, cmd/compile: implement and use DUFFCOPY on MIPS64 · 307544f4
      Meng Zhuo authored
      OS: Linux loongson 3.10.84 mips64el
      CPU: Loongson 3A3000 quad core
      
      name                   old time/op    new time/op    delta
      BinaryTree17              23.5s ± 1%     23.2s ± 0%  -1.12%  (p=0.008 n=5+5)
      Fannkuch11                10.2s ± 0%     10.1s ± 0%  -0.19%  (p=0.008 n=5+5)
      FmtFprintfEmpty           450ns ± 0%     446ns ± 1%  -0.89%  (p=0.024 n=5+5)
      FmtFprintfString          722ns ± 1%     721ns ± 1%    ~     (p=0.762 n=5+5)
      FmtFprintfInt             693ns ± 2%     691ns ± 2%    ~     (p=0.889 n=5+5)
      FmtFprintfIntInt          912ns ± 1%     911ns ± 0%    ~     (p=0.722 n=5+5)
      FmtFprintfPrefixedInt    1.35µs ± 2%    1.35µs ± 2%    ~     (p=1.000 n=5+5)
      FmtFprintfFloat          1.79µs ± 0%    1.78µs ± 0%    ~     (p=0.683 n=5+5)
      FmtManyArgs              3.46µs ± 1%    3.48µs ± 1%    ~     (p=0.246 n=5+5)
      GobDecode                48.8ms ± 1%    48.6ms ± 0%    ~     (p=0.222 n=5+5)
      GobEncode                37.7ms ± 1%    37.4ms ± 1%    ~     (p=0.095 n=5+5)
      Gzip                      1.72s ± 1%     1.72s ± 0%    ~     (p=0.905 n=5+4)
      Gunzip                    342ms ± 0%     342ms ± 0%    ~     (p=0.421 n=5+5)
      HTTPClientServer          219µs ± 1%     219µs ± 1%    ~     (p=1.000 n=5+5)
      JSONEncode               89.1ms ± 1%    89.4ms ± 1%    ~     (p=0.222 n=5+5)
      JSONDecode                292ms ± 1%     291ms ± 0%    ~     (p=0.421 n=5+5)
      Mandelbrot200            15.7ms ± 0%    15.6ms ± 0%    ~     (p=0.690 n=5+5)
      GoParse                  19.5ms ± 1%    19.6ms ± 1%    ~     (p=0.310 n=5+5)
      RegexpMatchEasy0_32       534ns ± 1%     529ns ± 1%    ~     (p=0.056 n=5+5)
      RegexpMatchEasy0_1K      2.75µs ± 0%    2.74µs ± 0%  -0.46%  (p=0.008 n=5+5)
      RegexpMatchEasy1_32       572ns ± 2%     565ns ± 3%    ~     (p=0.310 n=5+5)
      RegexpMatchEasy1_1K      4.15µs ± 0%    4.15µs ± 1%    ~     (p=0.548 n=5+5)
      RegexpMatchMedium_32     31.2ns ± 0%    31.1ns ± 0%  -0.45%  (p=0.016 n=5+4)
      RegexpMatchMedium_1K      235µs ± 1%     235µs ± 0%    ~     (p=1.000 n=5+5)
      RegexpMatchHard_32       13.9µs ± 1%    13.5µs ± 1%  -2.74%  (p=0.008 n=5+5)
      RegexpMatchHard_1K        416µs ± 2%     410µs ± 2%    ~     (p=0.056 n=5+5)
      Revcomp                   6.36s ± 0%     6.34s ± 0%  -0.31%  (p=0.008 n=5+5)
      Template                  352ms ± 1%     353ms ± 0%  +0.45%  (p=0.032 n=5+5)
      TimeParse                2.04µs ± 4%    2.01µs ± 0%    ~     (p=0.056 n=5+5)
      TimeFormat               2.97µs ± 0%    2.97µs ± 0%    ~     (p=1.000 n=5+5)
      
      name                   old speed      new speed      delta
      GobDecode              15.7MB/s ± 1%  15.8MB/s ± 0%    ~     (p=0.206 n=5+5)
      GobEncode              20.4MB/s ± 1%  20.5MB/s ± 1%    ~     (p=0.056 n=5+5)
      Gzip                   11.3MB/s ± 1%  11.3MB/s ± 0%    ~     (p=0.841 n=5+4)
      Gunzip                 56.7MB/s ± 0%  56.8MB/s ± 0%    ~     (p=0.389 n=5+5)
      JSONEncode             21.8MB/s ± 1%  21.7MB/s ± 1%    ~     (p=0.246 n=5+5)
      JSONDecode             6.66MB/s ± 0%  6.67MB/s ± 0%    ~     (p=0.857 n=4+5)
      GoParse                2.97MB/s ± 1%  2.96MB/s ± 1%    ~     (p=0.238 n=5+5)
      RegexpMatchEasy0_32    59.9MB/s ± 1%  60.5MB/s ± 1%  +0.92%  (p=0.032 n=5+5)
      RegexpMatchEasy0_1K     372MB/s ± 0%   374MB/s ± 0%  +0.46%  (p=0.008 n=5+5)
      RegexpMatchEasy1_32    56.0MB/s ± 2%  56.7MB/s ± 3%    ~     (p=0.310 n=5+5)
      RegexpMatchEasy1_1K     247MB/s ± 0%   247MB/s ± 1%    ~     (p=0.548 n=5+5)
      RegexpMatchMedium_32   32.0MB/s ± 0%  32.1MB/s ± 0%    ~     (p=0.135 n=5+5)
      RegexpMatchMedium_1K   4.35MB/s ± 1%  4.35MB/s ± 1%    ~     (p=0.825 n=5+5)
      RegexpMatchHard_32     2.30MB/s ± 1%  2.37MB/s ± 1%  +2.78%  (p=0.008 n=5+5)
      RegexpMatchHard_1K     2.47MB/s ± 1%  2.50MB/s ± 2%    ~     (p=0.095 n=5+5)
      Revcomp                40.0MB/s ± 0%  40.1MB/s ± 0%  +0.31%  (p=0.016 n=5+5)
      Template               5.51MB/s ± 1%  5.49MB/s ± 0%    ~     (p=0.190 n=5+5)
      
      Change-Id: I540a2e4e7992376ce04f93b332f64fc3b6071237
      Reviewed-on: https://go-review.googlesource.com/c/go/+/185078Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      307544f4
    • Tobias Klauser's avatar
      syscall: move Renameat to syscall_linux_$GOARCH.go · b58d9bb8
      Tobias Klauser authored
      On linux/riscv64, the renameat syscall no longer exists and has been
      superseded by renameat2. Thus we'll have to use Renameat2 to implement
      Renameat on linux/riscv64 for #27532. Prepare for this by moving the
      Renameat definition to the GOARCH specific files.
      
      Follow CL 157899 which did the same for golang.org/x/sys/unix
      
      Change-Id: I9670213cc3987df48fee962ddee36915a7785560
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192077
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      b58d9bb8
    • Ben Shi's avatar
      cmd/compile: optimize ARM's math.bits.RotateLeft32 · 3cfd003a
      Ben Shi authored
      This CL optimizes math.bits.RotateLeft32 to inline
      "MOVW Rx@>Ry, Rd" on ARM.
      
      The benchmark results of math/bits show some improvements.
      name               old time/op  new time/op  delta
      RotateLeft-4       9.42ns ± 0%  6.91ns ± 0%  -26.66%  (p=0.000 n=40+33)
      RotateLeft8-4      8.79ns ± 0%  8.79ns ± 0%   -0.04%  (p=0.000 n=40+31)
      RotateLeft16-4     8.79ns ± 0%  8.79ns ± 0%   -0.04%  (p=0.000 n=40+32)
      RotateLeft32-4     8.16ns ± 0%  7.54ns ± 0%   -7.68%  (p=0.000 n=40+40)
      RotateLeft64-4     15.7ns ± 0%  15.7ns ± 0%     ~     (all equal)
      
      updates #31265
      
      Change-Id: I77bc1c2c702d5323fc7cad5264a8e2d5666bf712
      Reviewed-on: https://go-review.googlesource.com/c/go/+/188697
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3cfd003a
    • Ben Shi's avatar
      cmd/compile: optimize ARM's math.Abs · c683ab81
      Ben Shi authored
      This CL optimizes math.Abs to an inline ABSD instruction on ARM.
      
      The benchmark results of src/math/ show big improvements.
      name                   old time/op  new time/op  delta
      Acos-4                  181ns ± 0%   182ns ± 0%   +0.30%  (p=0.000 n=40+40)
      Acosh-4                 202ns ± 0%   202ns ± 0%     ~     (all equal)
      Asin-4                  163ns ± 0%   163ns ± 0%     ~     (all equal)
      Asinh-4                 242ns ± 0%   242ns ± 0%     ~     (all equal)
      Atan-4                  120ns ± 0%   121ns ± 0%   +0.83%  (p=0.000 n=40+40)
      Atanh-4                 202ns ± 0%   202ns ± 0%     ~     (all equal)
      Atan2-4                 173ns ± 0%   173ns ± 0%     ~     (all equal)
      Cbrt-4                 1.06µs ± 0%  1.06µs ± 0%   +0.09%  (p=0.000 n=39+37)
      Ceil-4                 72.9ns ± 0%  72.8ns ± 0%     ~     (p=0.237 n=40+40)
      Copysign-4             13.2ns ± 0%  13.2ns ± 0%     ~     (all equal)
      Cos-4                   193ns ± 0%   183ns ± 0%   -5.18%  (p=0.000 n=40+40)
      Cosh-4                  254ns ± 0%   239ns ± 0%   -5.91%  (p=0.000 n=40+40)
      Erf-4                   112ns ± 0%   112ns ± 0%     ~     (all equal)
      Erfc-4                  117ns ± 0%   117ns ± 0%     ~     (all equal)
      Erfinv-4                127ns ± 0%   127ns ± 1%     ~     (p=0.492 n=40+40)
      Erfcinv-4               128ns ± 0%   128ns ± 0%     ~     (all equal)
      Exp-4                   212ns ± 0%   206ns ± 0%   -3.05%  (p=0.000 n=40+40)
      ExpGo-4                 216ns ± 0%   209ns ± 0%   -3.24%  (p=0.000 n=40+40)
      Expm1-4                 142ns ± 0%   142ns ± 0%     ~     (all equal)
      Exp2-4                  191ns ± 0%   184ns ± 0%   -3.45%  (p=0.000 n=40+40)
      Exp2Go-4                194ns ± 0%   187ns ± 0%   -3.61%  (p=0.000 n=40+40)
      Abs-4                  14.4ns ± 0%   6.3ns ± 0%  -56.39%  (p=0.000 n=38+39)
      Dim-4                  12.6ns ± 0%  12.6ns ± 0%     ~     (all equal)
      Floor-4                49.6ns ± 0%  49.6ns ± 0%     ~     (all equal)
      Max-4                  27.6ns ± 0%  27.6ns ± 0%     ~     (all equal)
      Min-4                  27.0ns ± 0%  27.0ns ± 0%     ~     (all equal)
      Mod-4                   349ns ± 0%   305ns ± 1%  -12.55%  (p=0.000 n=33+40)
      Frexp-4                54.0ns ± 0%  47.1ns ± 0%  -12.78%  (p=0.000 n=38+38)
      Gamma-4                 242ns ± 0%   234ns ± 0%   -3.16%  (p=0.000 n=36+40)
      Hypot-4                84.8ns ± 0%  67.8ns ± 0%  -20.05%  (p=0.000 n=31+35)
      HypotGo-4              88.5ns ± 0%  71.6ns ± 0%  -19.12%  (p=0.000 n=40+38)
      Ilogb-4                45.8ns ± 0%  38.9ns ± 0%  -15.12%  (p=0.000 n=40+32)
      J0-4                    821ns ± 0%   802ns ± 0%   -2.33%  (p=0.000 n=33+40)
      J1-4                    816ns ± 0%   807ns ± 0%   -1.05%  (p=0.000 n=40+29)
      Jn-4                   1.67µs ± 0%  1.65µs ± 0%   -1.45%  (p=0.000 n=40+39)
      Ldexp-4                61.5ns ± 0%  54.6ns ± 0%  -11.27%  (p=0.000 n=40+32)
      Lgamma-4                188ns ± 0%   188ns ± 0%     ~     (all equal)
      Log-4                   154ns ± 0%   147ns ± 0%   -4.78%  (p=0.000 n=40+40)
      Logb-4                 50.9ns ± 0%  42.7ns ± 0%  -16.11%  (p=0.000 n=34+39)
      Log1p-4                 160ns ± 0%   159ns ± 0%     ~     (p=0.828 n=40+40)
      Log10-4                 173ns ± 0%   166ns ± 0%   -4.05%  (p=0.000 n=40+40)
      Log2-4                 65.3ns ± 0%  58.4ns ± 0%  -10.57%  (p=0.000 n=37+37)
      Modf-4                 36.4ns ± 0%  36.4ns ± 0%     ~     (all equal)
      Nextafter32-4          36.4ns ± 0%  36.4ns ± 0%     ~     (all equal)
      Nextafter64-4          32.7ns ± 0%  32.6ns ± 0%     ~     (p=0.375 n=40+40)
      PowInt-4                300ns ± 0%   277ns ± 0%   -7.78%  (p=0.000 n=40+40)
      PowFrac-4               676ns ± 0%   635ns ± 0%   -6.00%  (p=0.000 n=40+35)
      Pow10Pos-4             17.6ns ± 0%  17.6ns ± 0%     ~     (all equal)
      Pow10Neg-4             22.0ns ± 0%  22.0ns ± 0%     ~     (all equal)
      Round-4                30.1ns ± 0%  30.1ns ± 0%     ~     (all equal)
      RoundToEven-4          38.9ns ± 0%  38.9ns ± 0%     ~     (all equal)
      Remainder-4             291ns ± 0%   263ns ± 0%   -9.62%  (p=0.000 n=40+40)
      Signbit-4              11.3ns ± 0%  11.3ns ± 0%     ~     (all equal)
      Sin-4                   185ns ± 0%   185ns ± 0%     ~     (all equal)
      Sincos-4                230ns ± 0%   230ns ± 0%     ~     (all equal)
      Sinh-4                  253ns ± 0%   246ns ± 0%   -2.77%  (p=0.000 n=39+39)
      SqrtIndirect-4         41.4ns ± 0%  41.4ns ± 0%     ~     (all equal)
      SqrtLatency-4          13.8ns ± 0%  13.8ns ± 0%     ~     (all equal)
      SqrtIndirectLatency-4  37.0ns ± 0%  37.0ns ± 0%     ~     (p=0.632 n=40+40)
      SqrtGoLatency-4         911ns ± 0%   911ns ± 0%   +0.08%  (p=0.000 n=40+40)
      SqrtPrime-4            13.2µs ± 0%  13.2µs ± 0%   +0.01%  (p=0.038 n=38+40)
      Tan-4                   205ns ± 0%   205ns ± 0%     ~     (all equal)
      Tanh-4                  264ns ± 0%   247ns ± 0%   -6.44%  (p=0.000 n=39+32)
      Trunc-4                45.2ns ± 0%  45.2ns ± 0%     ~     (all equal)
      Y0-4                    796ns ± 0%   792ns ± 0%   -0.55%  (p=0.000 n=35+40)
      Y1-4                    804ns ± 0%   797ns ± 0%   -0.82%  (p=0.000 n=24+40)
      Yn-4                   1.64µs ± 0%  1.62µs ± 0%   -1.27%  (p=0.000 n=40+39)
      Float64bits-4          8.16ns ± 0%  8.16ns ± 0%   +0.04%  (p=0.000 n=35+40)
      Float64frombits-4      10.7ns ± 0%  10.7ns ± 0%     ~     (all equal)
      Float32bits-4          7.53ns ± 0%  7.53ns ± 0%     ~     (p=0.760 n=40+40)
      Float32frombits-4      6.91ns ± 0%  6.91ns ± 0%   -0.04%  (p=0.002 n=32+38)
      [Geo mean]              111ns        106ns        -3.98%
      
      Change-Id: I54f4fd7f5160db020b430b556bde59cc0fdb996d
      Reviewed-on: https://go-review.googlesource.com/c/go/+/188678
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      c683ab81
    • Meng Zhuo's avatar
      cmd/asm: add V[LD|ST][2-4] vector instructions on arm64 · 8403d4ea
      Meng Zhuo authored
      This change adds VLD2, VLD3, VLD4, VST2, VST3, VST4 (multiple structures)
      for image or multi media optimazation.
      
      Change-Id: Iae3538ef4434e436e3fb2f19153c58f918f773af
      Reviewed-on: https://go-review.googlesource.com/c/go/+/166518
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      8403d4ea
    • Illya Yalovyy's avatar
      math/big: fast path for Cmp if same · be452cea
      Illya Yalovyy authored
      math/big.Int Cmp method does not have a fast path for the case if x and y are the same.
      
      Fixes #30856
      
      Change-Id: Ia9a5b5f72db9d73af1b13ed6ac39ecff87d10393
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178957
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      be452cea