Re: Abt RTL expression - Optimization

2006-11-03 Thread Ian Lance Taylor
Rohit Arul Raj [EMAIL PROTECTED] writes: The relevant part of RTL dump of fgcse pass is given below: (insn 13 12 50 0 (set (reg:CC 21 cc) (compare:CC (reg:SI 29 [ n ]) (const_int 30 [0x1e]))) 68 {*cmpsi_internal} (nil) (nil)) (insn 50 13 53 0 (parallel [

Abt RTL expression - Optimization

2006-11-02 Thread Rohit Arul Raj
Hi All, GCC 4.1.1 This small bit of code from one of the test suites ( gcc.c-torture/execute/20020611-1.c)worked fine with all optimization except size optimization -Os. unsigned int p; unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1; else p = 0;

Re: Abt RTL expression - Optimization

2006-10-30 Thread Ian Lance Taylor
Rohit Arul Raj [EMAIL PROTECTED] writes: The problem due to which the below mentioned program was not working is because of CODE HOISTING pass. I just masked the code hoisting step and the program worked fine. At this point, if you want us to be able to give you useful suggestions, you need

Re: Abt RTL expression - Optimization

2006-10-26 Thread Ian Lance Taylor
Rohit Arul Raj [EMAIL PROTECTED] writes: This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1; else p = 0; } when we tried to debug the emitted RTL instruction

Re: Abt RTL expression - Optimization

2006-10-26 Thread Rohit Arul Raj
On 26 Oct 2006 22:02:04 -0700, Ian Lance Taylor [EMAIL PROTECTED] wrote: Rohit Arul Raj [EMAIL PROTECTED] writes: This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1;

Re: Abt RTL expression - Optimization

2006-10-26 Thread Brooks Moses
Rohit Arul Raj wrote: I am working with a GCC Cross compiler version 4.1.1. This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1; else p = 0; } [...] 3. What are the

Re: Abt RTL expression - Optimization

2006-10-26 Thread Eric Botcazou
since p is a global variable, it can be used in other functions. Any other causes? The first thing to do is to post a reproducer. As Ian said, your code doesn't even compile... -- Eric Botcazou

Re: Abt RTL expression - Optimization

2006-10-26 Thread Ian Lance Taylor
Rohit Arul Raj [EMAIL PROTECTED] writes: This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1; else p = 0; } when we tried to debug the

Abt RTL expression - Optimization

2006-10-23 Thread Rohit Arul Raj
Hi all, This small bit of code worked fine with all optimization except Os. unsigned int n = 30; void x () { unsigned int h; h = n = 30; // Line 1 if (h) p = 1; else p = 0; } when we tried to debug the emitted RTL instruction for Os, it was found that RTL instruction for

Re: Abt RTL expression - Optimization

2006-10-23 Thread Andrew Pinski
On Mon, 2006-10-23 at 16:14 +0530, Rohit Arul Raj wrote: Hi all, This small bit of code worked fine with all optimization except Os. If you are working with 4.0 and greater, there are optimizations that happen before RTL, called the Tree-ssa optimizations. The optimization you are noticing