HomePhabricator

[FPEnv][InstSimplify] Fold fadd X, 0 ==> X, when we know X is not -0

Authored by kpn on Oct 14 2021, 9:31 AM.

Description

[FPEnv][InstSimplify] Fold fadd X, 0 ==> X, when we know X is not -0

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

This review is derived from D106362 with some improvements from D107285
and is a follow-on to D111085.

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