[PATCH] Optimize abs(x) < 0.0

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Jul 23 22:07:00 GMT 2002


 > From: Roger Sayle <roger@eyesopen.com>
 > 
 > I'd also appreciate it if somebody on the mailing list that
 > understands how these things are supposed to work could confirm that
 > the file below does whats intended.
 > 
 > *** /dev/null	Thu Aug 30 14:30:55 2001
 > --- gcc.c-torture/execute/20020720-1.x	Tue Jul 23 21:25:22 2002
 > ***************
 > *** 0 ****
 > --- 1,15 ----
 > + # This test has been reported to fail on AIX and MIPS.
 > + if { [istarget "powerpc-*-aix*"] || [istarget "rs6000-*-aix*"] \
 > +      || [istarget "mips*-*-*"] } {
 > +     set torture_execute_xfail [istarget]
 > + }

I'm pretty sure that your testcase always succeeds at -O0 in which
case the above will spuriously yield an XPASS at -O0.  I *think* that
if instead of setting torture_execute_xfail you "return 1" it'll
bypass the test entirely rather than run it and that should give you
clean results.  But I could be wrong.

Note you *can* test the .x file by putting your target in the list and
inserting a syntax error into the testcase.  That will test whether
the xfail is setup properly.


 > + # This test has also been reported to fail on sh64 with specific flags
 > + if { [istarget "sh64*-*-*"] } {
 > +     if { [string match "*nofpu*" $CFLAGS] \
 > +          || [string match "*compact*" $CFLAGS] } {
 > +         set torture_execute_xfail [istarget]
 > +     }
 > + }
 > +
 > + return 0

This may not work, I seem to recall that CFLAGS doesn't always contain
what you want.  Instead try using torture_eval_before_execute &
compiler_conditional_xfail_data.  Again, see execute/20020227-1.x.

		--Kaveh
--
Kaveh R. Ghazi			Director of Systems Architecture
ghazi@caip.rutgers.edu		Qwest Solutions



More information about the Gcc-patches mailing list