From 709e893d2402cf49e9556b376f3003ed82567b02 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 3 Jan 2019 13:39:30 +0100 Subject: 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. --- prog/hints.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prog/hints.go') 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 { -- cgit mrf-deployment