HomePhabricator

[FPEnv][InstSimplify] Fold constrained X + -0.0 ==> X

Authored by kpn on Oct 6 2021, 10:49 AM.

Description

[FPEnv][InstSimplify] Fold constrained X + -0.0 ==> X

Currently the fadd optimizations in InstSimplify don't know how to do this
"X + -0.0 ==> X" fold when using the constrained intrinsics. This adds the
support.

This commit is derived from D106362 with some improvements from D107285.

Differential Revision: https://reviews.llvm.org/D111085