This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/21970] [3.4 only] Inline keyword causes computation to erroneously reduce to a constant


------- Additional Comments From para at cfl dot rr dot com  2005-07-05 14:40 -------
The analysis is slightly flawed. For example:

UINT32 r0045025C = opt_and(ic, r004501D4);	  // N = and (_, M)   :00022108
UINT32 r00450994 = opt_not(r0045025C);		  // b = not (N)      :fffddef7

Since you are using 1s to represent bits that are known to be 0 and 0s to 
represent bits whose value are completely unknown, b should be 00000000. All 
known 0s flip to 1s, and you can say nothing about the other bits because their 
values are all unknown.

However, I ran my own analysis and came to the same conclusion. It seems that 
the mistake was mine as I was using and (&) instead of add (+) for the round 
key. My appologies. Interestingly, GCC 4.0 does *not* catch this optimization 
opportunity.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21970


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]