This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] use instruction-level fast-math-flags to drive MachineCombiner
ClosedPublic

Authored by shchenz on Apr 15 2020, 1:55 AM.

Details

Summary

Currently, on PowerPC target, it uses function scope UnsafeFPMath option to drive Machine Combiner pass.

This is not accurate in two ways:
1: the scope is not accurate. Machine Combiner pass only requires instruction-level flags instead of the function scope.
2: the float point flag is not accurate. Machine Combiner pass only requires float point flags reassoc and nsz.

X86 already fixed this issue in https://reviews.llvm.org/D74851
This patch fixes same issue for PowerPC.

Diff Detail

Event Timeline

shchenz created this revision.Apr 15 2020, 1:55 AM
steven.zhang accepted this revision.Apr 26 2020, 7:09 PM

LGTM, thank you for the clean up.

This revision is now accepted and ready to land.Apr 26 2020, 7:09 PM
This revision was automatically updated to reflect the committed changes.