ValueTracking: Drop rounding mode check for constrained_sqrt in CannotBeNegativeZero
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 16 May 2023 20:47:39 +0000 (21:47 +0100)
committerMatt Arsenault <arsenm2@gmail.com>
Mon, 22 May 2023 09:49:10 +0000 (10:49 +0100)
commitc21f1feed390a818458ebd069424ca80b0e4dfd5
treef864ced953899ca0e0c8f9d7f6cb3dda574f8594
parent8eaf7a75febf119f946d26104147287ad32782e3
ValueTracking: Drop rounding mode check for constrained_sqrt in CannotBeNegativeZero

The only value that can produce -0 is exactly -0, no rounding is involved. If the
denormal mode has flushed denormal inputs, a negative value could produce -0.
The constrained intrinsics do not track the denormal mode, and this is just
generally broken in the current set of FP predicates. The move to computeKnownFPClass
will address some of these issues.
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstSimplify/strictfp-sqrt-nonneg.ll