]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: teach prove about and operation
authorWayne Zuo <wdvxdr@golangcn.org>
Sat, 7 May 2022 05:58:24 +0000 (13:58 +0800)
committerGopher Robot <gobot@golang.org>
Sun, 8 May 2022 20:10:06 +0000 (20:10 +0000)
commit1efe38750a1f29c946fde694738c4ba2ed48ff98
tree65a33c95f91d5faa65fe1eb7696ca2d229ec8a81
parent3391517c0e4695a87cdb806cbf7b9760e7c9fa73
cmd/compile: teach prove about and operation

For this code:
z &= 63
_ = x<<z | x>>(64-z)
Now can prove 'x<<z' in bound. In ppc64 lowering pass, it will not
produce an extra '(ANDconst <typ.Int64> [63] z)' causing
codegen/rotate.go failed. Just remove the type check in rewrite rules
as the workaround.

Removes 32 bounds checks during make.bat.

Fixes #52563.

Change-Id: I14ed2c093ff5638dfea7de9bc7649c0f756dd71a
Reviewed-on: https://go-review.googlesource.com/c/go/+/404315
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/prove.go
src/cmd/compile/internal/ssa/rewritePPC64.go
test/prove.go