[llvm-commits] [PATCH] Fix: instcombine does not get max if hidden by sext
Tobias Grosser
grosser at fim.uni-passau.de
Fri Jan 7 13:39:16 PST 2011
On 01/07/2011 03:36 PM, Frits van Bommel wrote:
> On Fri, Jan 7, 2011 at 9:11 PM, Tobias Grosser
> <grosser at fim.uni-passau.de> wrote:
>> New version attached.
>
> You might be able to de-duplicate the sext case by using something like
> /* Check for sext */
> else if (ICI->isUnsigned()) {
> /* Check for zext */
> else
> break;
> } else
> break;
> (or the other way around) instead of
> if (ICI->isSigned()) {
> /* Check for sext */;
> } else {
> /* Check for sext and zext */
> }
Right. Changed and retested.
> You didn't include the test case patch this time, so I couldn't check
> that, but it should be fine as long as you have a test for each of the
> transformations mentioned at the top of the patch.
I do.
> Other than that, it looks fine to me (though I haven't completely
> re-checked the logic this time).
OK. Thanks.
I committed the patch in 123034:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110103/114784.html
Tobi
More information about the llvm-commits
mailing list