------- Comment #14 from rguenth at gcc dot gnu dot org 2008-04-17 15:09 ------- Created an attachment (id=15491) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15491&action=view) gimple semantics change patch
This is the variant I thought about with changing the way types are interpreted for the *CREMENT_EXPRs. The usual problem with vectorizer tests appear as SCEV doesn't handle for example <bb 3>: # i_14 = PHI <i_7(5), 0(2)> D.1560_4 = (int) i_14; a[D.1560_4] = D.1560_4; D.1561_6 = D.1560_4 + 1; i_7 = (short int) D.1561_6; if (i_7 <= 63) goto <bb 5>; else goto <bb 4>; but for correctness reasons we cannot do the increment in signed short int due to the undefined overflow issue. We can avoid the promotion if the result is truncated to an unsigned type (but this is an optimization that I didn't want to put into this patch addressing correctness only). I will re-test this patch, a slightly oder version tested ok apart from the vectorizer fallout. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35634