This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Do not exercise nested max/min pattern on abs
ClosedPublic

Authored by anna on Feb 16 2017, 12:44 PM.

Details

Summary

This is a fix for assertion failure in
getInverseMinMaxSelectPattern when ABS is passed in as a select pattern.

We should not be invoking the simplification rule for
ABS(MIN(~ x,y))) or ABS(MAX(~x,y)) combinations.

Added a test case which would cause an assertion failure without the patch.

Event Timeline

anna created this revision.Feb 16 2017, 12:44 PM
sanjoy accepted this revision.Feb 18 2017, 9:38 PM

LGTM

This revision is now accepted and ready to land.Feb 18 2017, 9:38 PM
This revision was automatically updated to reflect the committed changes.