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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 08:20:02 PST 2020


jonpa added a comment.

In D90760#2373757 <https://reviews.llvm.org/D90760#2373757>, @lebedev.ri wrote:

> This doesn't look right to me.
> This should be done elsewhere more generically.
> See the rest of SimplifyLibCalls.cpp - we should simply annotate ldexp's args with appropriate signext attribue.

I find cases of "CI->addParamAttr(ArgNo,  ...)", but I thought also the declaration of ldexp should as well have the signext attribute on the argument, not just on the call instruction operand. Or is that not needed?  (clang emits it also on the prototype for a normal function, it seems).  Passing the attributes like I did makes emitBinaryFloatFnCallHelper() add them to both 'Callee' and 'CI'...


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

https://reviews.llvm.org/D90760



More information about the llvm-commits mailing list