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]

Re: [RFA:] Fix gcc.c-torture/execute/20020720-1.x and further analysis


> I've just remembered, there's also a third alternative.  Adding
> condition code loading patterns to the PA-RISC backend.  Allowing
> (set (reg:CCFP 0) (const_int 0)) to be recognized [and a similar
> pattern for (const_int 1)] provides a convenient place holder
> for GCC's optimization passes.  In over 99% of cases, the user
> of the condition code will then be simplified, and the original
> condition code setting insn should be eliminated.

The following patch fixes the testcase.  Tested with no regressions
on hppa-unknown-linux-gnu.  Applied to main.

Thanks for the suggestion,
Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-09-04  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* pa.md (setccfp0, setccfp1): New patterns.

Index: config/pa/pa.md
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.110
diff -u -3 -p -r1.110 pa.md
--- config/pa/pa.md	27 Jul 2002 02:31:07 -0000	1.110
+++ config/pa/pa.md	4 Sep 2002 18:50:32 -0000
@@ -628,6 +628,26 @@
   [(set_attr "length" "4")
    (set_attr "type" "fpcc")])
 
+;; The following two patterns are optimization placeholders.  In almost
+;; all cases, the user of the condition code will be simplified and the
+;; original condition code setting insn should be eliminated.
+
+(define_insn "*setccfp0"
+  [(set (reg:CCFP 0)
+	(const_int 0))]
+  "! TARGET_SOFT_FLOAT"
+  "fcmp,dbl,!= %%fr0,%%fr0"
+  [(set_attr "length" "4")
+   (set_attr "type" "fpcc")])
+
+(define_insn "*setccfp1"
+  [(set (reg:CCFP 0)
+	(const_int 1))]
+  "! TARGET_SOFT_FLOAT"
+  "fcmp,dbl,= %%fr0,%%fr0"
+  [(set_attr "length" "4")
+   (set_attr "type" "fpcc")])
+
 ;; scc insns.
 
 (define_expand "seq"


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