Query regarding the commit rL341831: InstCombine: move hasOneUse check to the top of foldICmpAddConstant

Hi Tim,

Is there any specific reason why we are preventing this optimization for add instruction with multiple uses.
As this is preventing some further optimization in our benchmark.

Thanks,

Deepali

PS:

Author: Tim Northover tnorthover@apple.com

InstCombine: move hasOneUse check to the top of foldICmpAddConstant

There were two combines not covered by the check before now, neither of which

actually differed from normal in the benefit analysis.

The most recent seems to be because it was just added at the top of the

function (naturally). The older is from way back in 2008 (r46687) when we just

didn’t put those checks in so routinely, and has been diligently maintained

since.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341831 91177308-0d34-0410-b5e6-96231b3b80d8