]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix ifcvt-4.c to not depend on VRP2 asserts.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 25 Oct 2021 17:34:36 +0000 (13:34 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 28 Oct 2021 14:48:39 +0000 (10:48 -0400)
The testcase fails if VRP2 is replaced with a non-assert based VRP because it
accidentally depends on specific IL changes when the asserts are removed.  This
removes that dependency.

gcc/testsuite/
* gcc.dg/ifcvt-4.c: Adjust.

gcc/testsuite/gcc.dg/ifcvt-4.c

index ec142cfd94396c8347d239fffc6b67229051dc81..e74e449b40212632517201ab772e0bd31f7e320f 100644 (file)
@@ -13,8 +13,7 @@ foo (word x, word y, word a)
   word i = x;
   word j = y;
   /* Try to make taking the branch likely.  */
-  __builtin_expect (x > y, 1);
-  if (x > y)
+  if (__builtin_expect (x > y, 0))
     {
       i = a;
       j = i;