[PATCH] D90760: [InstCombiner] Make LibCallSimplifier add extension attribute to ldexp arg.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 07:26:06 PST 2020


lebedev.ri added a comment.

In D90760#2382857 <https://reviews.llvm.org/D90760#2382857>, @jonpa wrote:

> In D90760#2382851 <https://reviews.llvm.org/D90760#2382851>, @lebedev.ri wrote:
>
>> In D90760#2382819 <https://reviews.llvm.org/D90760#2382819>, @jonpa wrote:
>>
>>> ping
>>>
>>> @lebedev.ri   Thanks for review so far. Since this is keeping a SystemZ buildbot failing, I would appreciate some further advice here... thanks
>>
>> Given a function declaration, (e.g. that `@ldexp`), will/should all calls agree how the argument should be extended?
>
> I believe all calls to @ldexp should have the signext attribute.

Awesome. 
So, can you try if the miscompile goes away if you manually annotate the `@ldexp` declaration in IR with said `signext`?

> It is then up to the target to perform the sign extension if needed per the calling convention. The attribute is needed to inform the target what kind of extension should be performed (sign/zero).




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

https://reviews.llvm.org/D90760



More information about the llvm-commits mailing list