Re: [PATCH] Don't fold PTR - (UN)SIGNED comparison (PR middle-end/54945)

2012-10-19 Thread Richard Biener
On Thu, Oct 18, 2012 at 6:21 PM, Marek Polacek wrote: > This patch changes folding in fold_sign_changed_comparison in a way > that when we have pointer/non-pointer comparison, we give up folding > here. The issue is e.g. when we have (intptr_t) &MEM[(void *)&x + 4B] > == (intptr_t) &y and forwpro

[PATCH] Don't fold PTR - (UN)SIGNED comparison (PR middle-end/54945)

2012-10-18 Thread Marek Polacek
This patch changes folding in fold_sign_changed_comparison in a way that when we have pointer/non-pointer comparison, we give up folding here. The issue is e.g. when we have (intptr_t) &MEM[(void *)&x + 4B] == (intptr_t) &y and forwprop wants to fold this one via fold_binary_loc--we then end up fo