Re: [GSoC] constant-folding pattern not fired

2014-08-18 Thread Richard Biener
On Mon, Aug 18, 2014 at 1:45 PM, Prathamesh Kulkarni wrote: > On Mon, Aug 18, 2014 at 4:37 PM, Richard Biener > wrote: >> On Sun, Aug 17, 2014 at 9:50 PM, Prathamesh Kulkarni >> wrote: >>> Hi, >>>Apparently this pattern is not getting fired (even in isolation). >>> >>> /* x % 1 -> 0 */ >>> (

Re: [GSoC] constant-folding pattern not fired

2014-08-18 Thread Prathamesh Kulkarni
On Mon, Aug 18, 2014 at 4:37 PM, Richard Biener wrote: > On Sun, Aug 17, 2014 at 9:50 PM, Prathamesh Kulkarni > wrote: >> Hi, >>Apparently this pattern is not getting fired (even in isolation). >> >> /* x % 1 -> 0 */ >> (simplify >> (trunc_mod @0 integer_onep) >> { build_zero_cst (type);

Re: [GSoC] constant-folding pattern not fired

2014-08-18 Thread Richard Biener
On Sun, Aug 17, 2014 at 9:50 PM, Prathamesh Kulkarni wrote: > Hi, >Apparently this pattern is not getting fired (even in isolation). > > /* x % 1 -> 0 */ > (simplify > (trunc_mod @0 integer_onep) > { build_zero_cst (type); }) > > I tried with this test-case: > int f(int x) > { > int t1 =

[GSoC] constant-folding pattern not fired

2014-08-17 Thread Prathamesh Kulkarni
Hi, Apparently this pattern is not getting fired (even in isolation). /* x % 1 -> 0 */ (simplify (trunc_mod @0 integer_onep) { build_zero_cst (type); }) I tried with this test-case: int f(int x) { int t1 = 1; int t2 = x % t1; return t2; } I get the following output in ccp1 dump file