This is an archive of the discontinued LLVM Phabricator instance.

[FuzzMutate] Add mutator to modify instruction flags.
ClosedPublic

Authored by fhahn on Jan 18 2021, 3:39 AM.

Details

Summary

This patch adds a new InstModificationIRStrategy to mutate flags/options
for instructions. For example, it may add or remove nuw/nsw flags from
add, mul, sub, shl instructions or change the predicate for icmp
instructions.

Subtle changes such as those mentioned above should lead to a more
interesting range of inputs. The presence or absence of overflow flags
can expose subtle bugs, for example.

Diff Detail

Event Timeline

fhahn created this revision.Jan 18 2021, 3:39 AM
fhahn requested review of this revision.Jan 18 2021, 3:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2021, 3:39 AM
bogner accepted this revision.Jan 22 2021, 2:02 PM
This revision is now accepted and ready to land.Jan 22 2021, 2:02 PM
This revision was landed with ongoing or failed builds.Jan 23 2021, 11:05 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Jan 27 2021, 7:52 AM

Looks like this surfaced a new infinite loop in instcombine already: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29957 :)