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

[tree-ssa] Grammar for GIMPLE condexprs


Jason,

The GIMPLE grammar for conditional expressions says:

-----------------------------------------------------------------------------
      relop
              : '<'
              | '<='
              | '>'
              | '>='
              | '=='
              | '!='

      condexpr
              : val
              | val relop val

      val
              : ID
              | CONST
-----------------------------------------------------------------------------

And yet, the gimplifier is emitting things like

-----------------------------------------------------------------------------
  T.225 = a.224 < 0;
  b.226 = (int)b;
  T.227 = b.226 >= 0;
  if (T.225 ^ T.227)
    {
-----------------------------------------------------------------------------

It shouldn't be too hard to change that to

  if ((T.225 ^ T.227) != 0)

Right?  Do you see any problems if I make that change?  A pass
that I'm working on needs to build TRUTH_NOT_EXPR <cond> and it's
failing when I call fold() on the generated tree (because
invert_truthvalue can't deal with VAR_DECLs).


Thanks.  Diego.


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