[PATCH] D87877: [InstCombine] Fix errno bug in pow expansion to sqrt

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 08:15:54 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/pow-1.ll:269
 ;
-  %retval = call float @powf(float %x, float 0.5)
+  %retval = call ninf float @powf(float %x, float 0.5)
   ret float %retval
----------------
spatel wrote:
> I realize this will be a little more work, but it would be better to replicate this test with the additional FMF (and similarly for other tests that are changing the flags and/or libcall/intrinsic).
> 
> That way, we'll retain the likely original intent of the test and add coverage for the cases that we want to verify are not miscompiled.
I'm not convinced the coverage is meaningfully being lost. There is already a fairly exhaustive combination of tests in `pow-sqrt.ll`. The `double` version of this test (with no FMF) appears twice already.

I meant what I said when I wrote that the changes are made "depending on emphasis in the checks for library calls, avoidance of overlap, and overall coverage". Following that guideline, I found the specific test changes to be rather deterministic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87877/new/

https://reviews.llvm.org/D87877



More information about the llvm-commits mailing list