optimization/8178: __builtin_ffs broken

Richard Henderson rth@redhat.com
Thu Mar 13 03:30:00 GMT 2003


On Wed, Mar 12, 2003 at 01:30:29PM +0100, Volker Reichelt wrote:
> I can confirm that the problem is still present on k6.
> According to Phil's tester the problem for the ix86 was fixed
> between 2003-01-31 and 2003-02-01.

Backporting the patch you mention isn't an option, but
this bug is fixable for 3.2/3.3 trivially.


r~


	* config/i386/i386.md (ffssi2): Tighten op1 predicate to 
	match the requirements of the output insns.

Index: gcc/config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.404.2.10
diff -c -p -d -u -r1.404.2.10 i386.md
--- gcc/config/i386/i386.md	12 Mar 2003 09:35:27 -0000	1.404.2.10
+++ gcc/config/i386/i386.md	13 Mar 2003 00:41:08 -0000
@@ -13671,7 +13671,7 @@
 
 (define_expand "ffssi2"
   [(set (match_operand:SI 0 "nonimmediate_operand" "") 
-	(ffs:SI (match_operand:SI 1 "general_operand" "")))]
+	(ffs:SI (match_operand:SI 1 "nonimmediate_operand" "")))]
   ""
 {
   rtx out = gen_reg_rtx (SImode), tmp = gen_reg_rtx (SImode);



More information about the Gcc-bugs mailing list