[llvm-commits] [PATCH] Fix: instcombine does not get max if hidden by sext
Frits van Bommel
fvbommel at gmail.com
Fri Jan 7 12:36:14 PST 2011
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 */
}
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.
Other than that, it looks fine to me (though I haven't completely
re-checked the logic this time).
More information about the llvm-commits
mailing list