Skip to content

Commit

Permalink
[release-branch.go1.20] Revert "cmd/compile: teach prove about bitwis…
Browse files Browse the repository at this point in the history
…e OR operation"

This reverts commit 3680b5e.

Reason for revert: causes long compile times on certain functions. See issue #57959

Change-Id: Ie9e881ca8abbc79a46de2bfeaed0b9d6c416ed42
Reviewed-on: https://go-review.googlesource.com/c/go/+/463295
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
(cherry picked from commit a6ddb15)
Reviewed-on: https://go-review.googlesource.com/c/go/+/463415
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
  • Loading branch information
randall77 authored and gopherbot committed Jan 25, 2023
1 parent 5adb0ca commit 10124c2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/cmd/compile/internal/ssa/prove.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,6 @@ func prove(f *Func) {
case OpAnd64, OpAnd32, OpAnd16, OpAnd8:
ft.update(b, v, v.Args[1], unsigned, lt|eq)
ft.update(b, v, v.Args[0], unsigned, lt|eq)
case OpOr64, OpOr32, OpOr16, OpOr8:
ft.update(b, v, v.Args[1], unsigned, gt|eq)
ft.update(b, v, v.Args[0], unsigned, gt|eq)
case OpPhi:
// Determine the min and max value of OpPhi composed entirely of integer constants.
//
Expand Down
5 changes: 0 additions & 5 deletions test/prove.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,6 @@ func issue51622(b []byte) int {
return 0
}

func issue45928(x int) {
combinedFrac := (x) / (x | (1 << 31)) // ERROR "Proved Neq64$"
useInt(combinedFrac)
}

//go:noinline
func useInt(a int) {
}
Expand Down

0 comments on commit 10124c2

Please sign in to comment.