[PATCH] D13757: [x86] promote 'add nsw' to a wider type to allow more combines

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 10:46:55 PDT 2015


qcolombet added a comment.

Hi Sanjay,

I’m fine with the patch as a temporary solution, assuming this is critical to have a fix sooner rather than later.

For longer term, this kind of transformations should be done in a generic place for all targets to benefit. Right now, I imagine you saw, we have the infrastructure to perform such promotion in CodeGenPrepare. Moreover, we already have dedicated model to expose more “combines” for addressing modes and extended loads.
Therefore, to me, it seems the right thing is to extend CodeGenPrepare to expose more of such combines. I am not saying that is easy :).

What do you think?

Cheers,
-Quentin


http://reviews.llvm.org/D13757





More information about the llvm-commits mailing list