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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #13)
> LLVM is able to produce the neg/branch combo now while GCC is not.

One more testcase:
void foo (void);
void bar (void);
int g(int, int);

int
test (int a)
{
  int r;

  if (r = -a)
    foo ();
  else
    bar ();

  return g(a,r);
}
---- CUT ----
LLVM is able to move the -a past the if statement still.
So it is not as simple as a single usage either for LLVM.

Reply via email to