Re: [PATCH] Fix optimize_range_tests_diff

2014-11-18 Thread Richard Sandiford
Jakub Jelinek ja...@redhat.com writes: On Tue, Oct 14, 2014 at 11:23:22AM -0600, Jeff Law wrote: On 10/14/14 10:02, Jakub Jelinek wrote: When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X -

[PATCH] Fix optimize_range_tests_diff

2014-10-14 Thread Jakub Jelinek
Hi! When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X - 43U) = 3U || (X - 75U) = 3U and this loop can transform that into ((X - 43U) ~(75U - 43U)) = 3U. */ we actually don't transform it

Re: [PATCH] Fix optimize_range_tests_diff

2014-10-14 Thread Richard Biener
On October 14, 2014 6:02:19 PM CEST, Jakub Jelinek ja...@redhat.com wrote: Hi! When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X - 43U) = 3U || (X - 75U) = 3U and this loop can transform that

Re: [PATCH] Fix optimize_range_tests_diff

2014-10-14 Thread Jeff Law
On 10/14/14 10:02, Jakub Jelinek wrote: Hi! When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X - 43U) = 3U || (X - 75U) = 3U and this loop can transform that into ((X - 43U) ~(75U -

Re: [PATCH] Fix optimize_range_tests_diff

2014-10-14 Thread Jakub Jelinek
On Tue, Oct 14, 2014 at 11:23:22AM -0600, Jeff Law wrote: On 10/14/14 10:02, Jakub Jelinek wrote: When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X - 43U) = 3U || (X - 75U) = 3U and

Re: [PATCH] Fix optimize_range_tests_diff

2014-10-14 Thread Jeff Law
On 10/14/14 11:40, Jakub Jelinek wrote: On Tue, Oct 14, 2014 at 11:23:22AM -0600, Jeff Law wrote: On 10/14/14 10:02, Jakub Jelinek wrote: When hacking on range reassoc opt, I've noticed we can emit code with undefined behavior even when there wasn't one originally, in particular for: (X -