1
0
mirror of https://github.com/golang/go synced 2024-11-17 15:04:45 -07:00

cmd/compile/internal/ssa: fix typo in sccp

This commit is contained in:
Wingrez 2024-01-21 17:22:14 +08:00 committed by GitHub
parent de4f7ee767
commit f89d7ee576
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -343,7 +343,7 @@ func computeLattice(f *Func, val *Value, args ...*Value) lattice {
// However, this would create a huge switch for all opcodes that can be
// evaluated during compile time. Moreover, some operations can be evaluated
// only if its arguments satisfy additional conditions(e.g. divide by zero).
// It's fragile and error prone. We did a trick by reusing the existing rules
// It's fragile and error-prone. We did a trick by reusing the existing rules
// in generic rules for compile-time evaluation. But generic rules rewrite
// original value, this behavior is undesired, because the lattice of values
// may change multiple times, once it was rewritten, we lose the opportunity