Commit 743fd917 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder Committed by Austin Clements

cmd/compile: use AuxInt to store shift boundedness

Fixes ssacheck build.

Change-Id: Idf1d2ea9a971a1f17f2fca568099e870bb5d913f
Reviewed-on: https://go-review.googlesource.com/110122
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAustin Clements <austin@google.com>
parent af5143e3
...@@ -994,7 +994,7 @@ func simplifyBlock(sdom SparseTree, ft *factsTable, b *Block) { ...@@ -994,7 +994,7 @@ func simplifyBlock(sdom SparseTree, ft *factsTable, b *Block) {
} }
bits := 8 * v.Args[0].Type.Size() bits := 8 * v.Args[0].Type.Size()
if lim.umax < uint64(bits) || (lim.max < bits && ft.isNonNegative(by)) { if lim.umax < uint64(bits) || (lim.max < bits && ft.isNonNegative(by)) {
v.Aux = true v.AuxInt = 1 // see shiftIsBounded
if b.Func.pass.debug > 0 { if b.Func.pass.debug > 0 {
b.Func.Warnl(v.Pos, "Proved %v bounded", v.Op) b.Func.Warnl(v.Pos, "Proved %v bounded", v.Op)
} }
......
...@@ -393,7 +393,7 @@ func b2i(b bool) int64 { ...@@ -393,7 +393,7 @@ func b2i(b bool) int64 {
// shiftIsBounded reports whether (left/right) shift Value v is known to be bounded. // shiftIsBounded reports whether (left/right) shift Value v is known to be bounded.
// A shift is bounded if it is shifting by less than the width of the shifted value. // A shift is bounded if it is shifting by less than the width of the shifted value.
func shiftIsBounded(v *Value) bool { func shiftIsBounded(v *Value) bool {
return v.Aux != nil && v.Aux.(bool) return v.AuxInt != 0
} }
// i2f is used in rules for converting from an AuxInt to a float. // i2f is used in rules for converting from an AuxInt to a float.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment