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 probable causes for the elimination of RTL code's (Compare & gtu) between the above mentioned passes?
At first glance (and, admittedly, not knowing much about the particulars of GCC's optimizer), that certainly looks like something that I would expect to be eliminated due to constant folding. Have you checked to see whether or not it is eliminated with other optimization levels?
- Brooks
