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

fix target/21761, rs6000 mode macro conversion bug


When this pattern was converted to use mode macros, I missed the
'TARGET_32BIT'.

Bootstrapped & tested on powerpc-darwin8, plus I checked that the
testcase does actually compile (to .s) with -m64 -O3.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/rs6000-pr21761.patch======================
2005-05-29  Geoffrey Keating  <geoffk@apple.com>

	PR target/21761
	* config/rs6000/rs6000.md: Remove stray TARGET_32BIT from
	pattern involving `:P'.

Index: testsuite/ChangeLog
2005-05-29  Geoffrey Keating  <geoffk@apple.com>

	PR target/21761
	* gcc.c-torture/compile/pr21761.c: New.

Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.369
diff -u -p -u -p -r1.369 rs6000.md
--- config/rs6000/rs6000.md	18 May 2005 23:54:32 -0000	1.369
+++ config/rs6000/rs6000.md	30 May 2005 06:05:08 -0000
@@ -1672,7 +1672,7 @@
 		    (const_int 0)))
    (set (match_operand:P 0 "gpc_reg_operand" "")
 	(neg:P (match_dup 1)))]
-  "TARGET_32BIT && reload_completed"
+  "reload_completed"
   [(set (match_dup 0)
 	(neg:P (match_dup 1)))
    (set (match_dup 2)
Index: testsuite/gcc.c-torture/compile/pr21761.c
===================================================================
RCS file: testsuite/gcc.c-torture/compile/pr21761.c
diff -N testsuite/gcc.c-torture/compile/pr21761.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.c-torture/compile/pr21761.c	30 May 2005 06:05:09 -0000
@@ -0,0 +1,9 @@
+void f1()
+{
+  long bit=0, exponent;
+  exponent = -exponent;
+  for (bit = 1; exponent; bit <<= 1)
+      if (exponent & bit)
+              exponent ^= bit;
+}
+
============================================================


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