mirror of
https://github.com/golang/go
synced 2024-11-23 22:50:05 -07:00
[dev.power64] 5g: fix mistaken bit-wise AND in regopt
Replace a bit-wise AND with a logical one. This happened to work before because bany returns 0 or 1, but the intent here is clearly logical (and this makes 5g match with 6g and 8g). LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/172850043
This commit is contained in:
parent
e156f0e997
commit
7739533f61
@ -393,7 +393,7 @@ loop2:
|
||||
for(z=0; z<BITS; z++)
|
||||
bit.b[z] = (r->refahead.b[z] | r->calahead.b[z]) &
|
||||
~(externs.b[z] | params.b[z] | addrs.b[z] | consts.b[z]);
|
||||
if(bany(&bit) & !r->f.refset) {
|
||||
if(bany(&bit) && !r->f.refset) {
|
||||
// should never happen - all variables are preset
|
||||
if(debug['w'])
|
||||
print("%L: used and not set: %Q\n", r->f.prog->lineno, bit);
|
||||
|
Loading…
Reference in New Issue
Block a user