This is the mail archive of the gcc@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]

Re: fold_single_bit_test problems with 3.4.1


Dmitry <diwil@spec.ru> writes:
> Is it possible to avoid single bit test folding during code generation, cause
> in my target shift costs lot more than bittest?
>
> for operation:
> 	if (a &4) g();
> gcc does:
>
> a >>= 2;
> C = a&1
> if(c)
> 	g();
>
> Do I have to define something extra to avoid it?
> This problem also persits in mips target.

This was a problem in 3.4, but it should already be fixed in CVS mainline,
provided you define your rtx_costs properly.  See the thread starting at
<http://gcc.gnu.org/ml/gcc-patches/2004-03.o/msg01456.html> if you need
to backport the fix to 3.4.

Richard


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