]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: prevent constant folding of +/- when result is NaN
authorKeith Randall <khr@golang.org>
Fri, 10 Apr 2020 16:43:22 +0000 (09:43 -0700)
committerKeith Randall <khr@golang.org>
Fri, 10 Apr 2020 19:32:41 +0000 (19:32 +0000)
commit83e288f3dbfdc83e4a016c60d54f928f69608d9a
treea52c313cb730d20837e523bce16d56eddf9f8c32
parent37470c06644ec916821ec82ed84abc2f0d0b876c
cmd/compile: prevent constant folding of +/- when result is NaN

Missed as part of CL 221790. It isn't just * and / that can make NaNs.

Update #36400
Fixes #38359

Change-Id: I3fa562f772fe03b510793a6dc0cf6189c0c3e652
Reviewed-on: https://go-review.googlesource.com/c/go/+/227860
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go
test/fixedbugs/issue38359.go [new file with mode: 0644]