[LLVMdev] A question about everyone's favorite constructs: NSW and NUW
chandlerc at google.com
Tue Jan 7 11:40:54 PST 2014
On Tue, Jan 7, 2014 at 2:24 PM, Quentin Colombet <qcolombet at apple.com>wrote:
> I agree with Andy and Jim.
> Actually, I have prototyped a compiler that does exactly this kind of
> promotion in CodeGenPrepare.
> Basically, I have updated the addressing mode matcher so that it moves a
> sext that is in a way of an addressing mode (i.e., it promotes the operand
> of the sext, let us call this operand def, if it is legal to do so, and
> sign extends the operands of def). When the matcher does not manage to
> absorb more computation after promoting def, it can revert the promotion.
> I am currently benchmarking this solution and I’ll update this thread with
> the results.
Very cool. Could you share the patch? I can also run some benchmarks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev