This is an archive of the discontinued LLVM Phabricator instance.

[X86] combineFneg - generalize FMA negations with isNegatibleForFree/getNegatedExpression
ClosedPublic

Authored by RKSimon on Feb 7 2020, 9:36 AM.

Details

Summary

This has a really interesting side effect in that it improves some UMAX/UMIN reduction code which had redundant XOR(SHUFFLE(XOR(X,SIGNMASK)),SIGNMASK) patterns - the isNegatible recognises it as FNEG(SHUFFLE(FNEG(X))).... We have a lot of FNEG patterns bitcasted to the integer domain for XOR signbit twiddling which is similar to what we do to allow UMAX/UMIN to be lowered using SMAX/SMIN.

Diff Detail

Event Timeline

RKSimon created this revision.Feb 7 2020, 9:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2020, 9:36 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
This revision is now accepted and ready to land.Feb 12 2020, 4:30 AM
This revision was automatically updated to reflect the committed changes.