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: [tree-ssa] PATCH to gimplify_boolean_expr


On 25 Aug 2003 16:20:31 -0400, Andrew MacLeod <amacleod@redhat.com> wrote:

> On Mon, 2003-08-25 at 15:36, Jason Merrill wrote:

>> I've been playing with just requiring a val for if conditions in order to
>> avoid redundancy, but that breaks a lot of RTL optimizations.  When we're
>> ready, it's a simple matter of changing "is_gimple_condexpr" to
>> "is_gimple_val" in gimplify_cond_expr; feel free to try it out.

It works, we just miss some RTL optimizations.  For instance, this testcase
fails on the trunk, but if you move the comparison into the 'if' it passes.

  extern void link_error(void);
  extern float cabsf (float _Complex);

  int main ()
  {
    float _Complex fc = 3.0F + 4.0iF;
    _Bool b = __builtin_cabsf (fc) != 5.0F;
    if (b)
      link_error ();
  }

Jason


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