[PATCH] D28928: [ValueTracking] Implement SignBitMustBeZero correctly for sqrt.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 15:03:24 PST 2017


efriedma added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll:237
+  %sqrt = call nnan nsz float @llvm.sqrt.f32(float %a)
+  %fabs = call float @llvm.fabs.f32(float %sqrt)
+  ret float %fabs
----------------
I'm not convinced this transform is legal without an nsz flag on the fabs...

Patch is fine otherwise.


https://reviews.llvm.org/D28928





More information about the llvm-commits mailing list