diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-01-03 13:39:30 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-03 13:39:30 +0100 |
| commit | 709e893d2402cf49e9556b376f3003ed82567b02 (patch) | |
| tree | fb9aec959d50779a9d69e76e9c94ff4fc145f29e /prog/hints.go | |
| parent | adddc5fd46167e2c22cdc6a7d0d7b73cc418dc6f (diff) | |
prog: don't produce the same program when mutating with hints
No point in producing the same program as result of mutation with hints.
So don't do it.
Diffstat (limited to 'prog/hints.go')
| -rw-r--r-- | prog/hints.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/prog/hints.go b/prog/hints.go index 8ac3ed735..16ffe783e 100644 --- a/prog/hints.go +++ b/prog/hints.go @@ -209,6 +209,9 @@ func shrinkExpand(v uint64, compMap CompMap) []uint64 { // Replace size least significant bits of v with // corresponding bits of newV. Leave the rest of v as it was. replacer := (v &^ mask) | newV + if replacer == v { + continue + } // TODO(dvyukov): should we try replacing with arg+/-1? // This could trigger some off-by-ones. if replacers == nil { |
