https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111468

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Blocks|                            |101057
            Version|unknown                     |14.0
             Status|NEW                         |ASSIGNED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm.  The "closest" we have is

static c_expr
c_parser_gimple_binary_expression (gimple_parser &parser)
{
...
    case CPP_NAME:
        {
          tree id = c_parser_peek_token (parser)->value;
          if (strcmp (IDENTIFIER_POINTER (id), "__MULT_HIGHPART") == 0)
            {
              code = MULT_HIGHPART_EXPR;

we can support the u== syntax or lean on the above and go with __UNEQ and
friends.  I'd probably go with __UNEQ.

diff --git a/gcc/c/gimple-parser.cc b/gcc/c/gimple-parser.cc
index cc3a8899d97..faf2def599f 100644
--- a/gcc/c/gimple-parser.cc
+++ b/gcc/c/gimple-parser.cc
@@ -1013,6 +1013,12 @@ c_parser_gimple_binary_expression (gimple_parser
&parser)
              code = MULT_HIGHPART_EXPR;
              break;
            }
+         else if (strcmp (IDENTIFIER_POINTER (id), "__UNEQ") == 0)
+           {
+             code = UNEQ_EXPR;
+             ret_type = truth_type_for (TREE_TYPE (lhs.value));
+             break;
+           }
        }
       /* Fallthru.  */
     default:

and

void stuff();

void __GIMPLE (ssa,startwith("threadfull1"))
foo (float a, float b, int cond)
{
  float x;
  _Bool _7;

 __BB(2):
  if (cond_3(D) != 0)
    goto __BB4;
  else
    goto __BB3;

 __BB(3):
  goto __BB4;

 __BB(4):
  x_1 = __PHI (__BB2: a_5(D), __BB3: b_4(D));
  _7 = x_1 __UNEQ a_5(D);
  if (_7 != _Literal (_Bool) 0)
    goto __BB5;
  else
    goto __BB6;

 __BB(5):
  stuff ();
  goto __BB6;

 __BB(6):
  return;

}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101057
[Bug 101057] [gimplefe] GIMPLE frontend issues

Reply via email to