[PATCH] D139312: ValueTracking: Teach CannotBeOrderedLessThanZero about copysign
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 07:21:54 PST 2022
arsenm added inline comments.
================
Comment at: llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll:964
+;
+ %sqrt = call ninf nnan float @llvm.sqrt.f32(float %sign)
+ %copysign = call float @llvm.copysign.f32(float %unknown, float %sqrt)
----------------
spatel wrote:
> Something went wrong - this is a miscompile without 'nsz' on the sqrt (otherwise, it can return -0.0):
> https://alive2.llvm.org/ce/z/yqXQmQ
But this is being consumed by an fcmp - the sign of the zero shouldn't matter for the final result. Alive bug?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139312/new/
https://reviews.llvm.org/D139312
More information about the llvm-commits
mailing list