Currently the fsub optimizations in InstSimplify don't know how to fold X - -0.0 to X when we know X is not zero and the constrained intrinsics are used. This adds the support.
This review is split out from D107285.
Paths
| Differential D119746
[FPEnv][InstSimplify] Fold fsub X, -0 ==> X, when we know X is not -0 ClosedPublic Authored by kpn on Feb 14 2022, 10:58 AM.
Details Summary Currently the fsub optimizations in InstSimplify don't know how to fold X - -0.0 to X when we know X is not zero and the constrained intrinsics are used. This adds the support. This review is split out from D107285.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Feb 15 2022, 10:32 AM This revision was landed with ongoing or failed builds.Feb 16 2022, 7:10 AM Closed by commit rGc7400892caa0: [FPEnv][InstSimplify] Fold fsub X, -0 ==> X, when we know X is not -0 (authored by kpn). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 409238 llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/strictfp-fsub.ll
|