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: [PATCH RESUBMIT]: add tree-based folding of builtin signbit*


 > On CVS mainline at -O2, "foo" is optimized to "return 0;" before the
 > .00.expand RTL dump, i.e. -dr.  The function "bar", on the other hand,
 > has initial RTL containing floating point loads from the constant pool
 > and an SImode lshiftrt by 31.  This is on i686-pc-linux-gnu.  As I'd
 > expected, the RTL optimizers manage to take up the slack, so by the
 > time we generate assembly language, both functions generate the same
 > code.  However, the point is that we fail to optimize through the
 > union at the tree-level, a potential regression with your patch.

The important point IMHO is that we get the same result.  But I
suppose if our goal is to eventually zap most of the RTL optimizers in
favor of tree-ssa stuff, then as you say it's a potential regression.

 > > AFAICT, signbitl isn't RTL expanded.  Certainly relying on the RTL
 > > expanders becomes more compelling if it actually works. :-)
 > > Care to implement that?  (RTL is rather opaque to me.)
 > 
 > It should be a "simple" matter of cut-n-pasting the code from RTH's
 > recent copysign work.  I'll probably get some time to investigate a
 > patch for it this weekend.

Since you've so kindly volunteered to fix the expander, that will
address my concern about having signbitl work.  And thus I'll withdraw
my patch to do it at the tree-level.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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