Displaying 3 results from an estimated 3 matches for "replacepowwithsqrt".
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
...quot;
returns true.
> If there are other errno divergences for edge case values, we may need to
> check other conditions.
>
> On Sat, Sep 12, 2020 at 9:37 PM Hubert Tong via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> The transformation in LibCallSimplifier::replacePowWithSqrt with respect
>> to -Inf uses a select instruction, which based on the observed behaviour,
>> incorporates the side effects of the unchosen branch. This means that (for
>> pow) a call to sqrt(-Inf) is materialized. Such a call is specified as
>> having a domain error (C17 sub...
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
...iately erasing that
select with the code from the godbolt example.
Does the real motivating case have no uses of the pow() result value?
On Mon, Sep 14, 2020 at 1:03 PM Sanjay Patel <spatel at rotateright.com> wrote:
> Yes, I mean just bail out on the transform in
> LibCallSimplifier::replacePowWithSqrt() -> getSqrtCall(). If we can't prove
> the call behaves the same with errno, then give up.
> I'm not sure where the select / branching happens, but I don't see that
> happening in the initial transform (called from -instcombine)
>
> On Mon, Sep 14, 2020 at 12:58 PM Hu...
2020 Sep 13
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
The transformation in LibCallSimplifier::replacePowWithSqrt with respect to
-Inf uses a select instruction, which based on the observed behaviour,
incorporates the side effects of the unchosen branch. This means that (for
pow) a call to sqrt(-Inf) is materialized. Such a call is specified as
having a domain error (C17 subclause 7.12.7.5) since the operand i...