[llvm] r258325 - [LibCallSimplifier] don't get fooled by a fake sqrt()

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 13:53:11 PST 2016


Merged in r258353.

Thanks,
Hans

On Wed, Jan 20, 2016 at 10:26 AM, Sanjay Patel <spatel at rotateright.com> wrote:
> Hi Hans -
>
> If you can do the merge to 3.8, I'd appreciate it.
>
> Thanks!
>
> On Wed, Jan 20, 2016 at 10:55 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> On Wed, Jan 20, 2016 at 9:41 AM, Sanjay Patel via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>> > Author: spatel
>> > Date: Wed Jan 20 11:41:14 2016
>> > New Revision: 258325
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=258325&view=rev
>> > Log:
>> > [LibCallSimplifier] don't get fooled by a fake sqrt()
>> >
>> > The test case will crash without this patch because the subsequent call
>> > to
>> > hasUnsafeAlgebra() assumes that the call instruction is an
>> > FPMathOperator
>> > (ie, returns an FP type).
>> >
>> > This part of the function signature check was omitted for the sqrt()
>> > case,
>> > but seems to be in place for all other transforms.
>> >
>> > Before:
>> > http://reviews.llvm.org/rL257400
>> > ...we would have needlessly continued execution in optimizeSqrt(), but
>> > the
>> > bug was harmless because we'd eventually fail some other check and
>> > return
>> > without damage.
>> >
>> > This should fix:
>> > https://llvm.org/bugs/show_bug.cgi?id=26211
>> >
>> > Differential Revision: http://reviews.llvm.org/D16198
>>
>> Please go ahead and merge this to 3.8 once it's been on the buildbots
>> for a while, or let me know if you'd prefer me to do it.
>>
>> Thanks,
>> Hans
>
>


More information about the llvm-commits mailing list