This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Propagate math flags from intrinsics to instructions
ClosedPublic

Authored by MattDevereau on Oct 5 2021, 6:23 AM.

Details

Summary

Retain floating-point math flags inside instCombineSVEVectorBinOp

Diff Detail

Event Timeline

MattDevereau created this revision.Oct 5 2021, 6:23 AM
MattDevereau requested review of this revision.Oct 5 2021, 6:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 6:23 AM
peterwaller-arm accepted this revision.Oct 5 2021, 6:30 AM

Looks reasonable to me but I had a hand in it. Please wait 24h to give other reviewers a chance to chime in.

This revision is now accepted and ready to land.Oct 5 2021, 6:30 AM
Matt added a subscriber: Matt.Oct 5 2021, 6:37 AM
david-arm added inline comments.Oct 5 2021, 6:40 AM
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
713

nit: I'm not sure where the additional cosmetic code changes came from? It looks like you only really need to add the setFastMathFlags line?

MattDevereau added inline comments.Oct 5 2021, 6:44 AM
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
713

we had a short discussion about what looks better and might be easier to read, debug and work with. its a simple change if you disagree

peterwaller-arm added inline comments.Oct 5 2021, 6:51 AM
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
713

For what it's worth I provoked this by suggesting in private that I wanted to see the parameter to IC.replaceInstUsesWith as its own variable in the original patch, and to generally avoid putting too much into a single line, for readability.

In the case of extracting OpPredicate I agree that it is marginal.

david-arm accepted this revision.Oct 5 2021, 6:53 AM

LGTM!

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
713

No problem, thanks for the explanation! Happy with the patch