Look for a message of a successful ifcvt in the relevant RTL dump instead of scanning asm dump.
2019-04-09 Uroš Bizjak <ubiz...@gmail.com> * gcc.target/i386/ifcvt-onecmpl-abs-1.c (dg-options): Use -O2 -fdump-rtl-ce1. (dg-final): Scan ce1 RTL dump instead of asm dump. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros.
Index: gcc.target/i386/ifcvt-onecmpl-abs-1.c =================================================================== --- gcc.target/i386/ifcvt-onecmpl-abs-1.c (revision 270230) +++ gcc.target/i386/ifcvt-onecmpl-abs-1.c (working copy) @@ -1,9 +1,5 @@ /* { dg-do compile } */ -/* This test checks for if-conversion of one's complement - * abs function. */ -/* { dg-options "-O -mtune=generic" } */ -/* { dg-final { scan-assembler "cltd" } } */ -/* { dg-final { scan-assembler "xor" } } */ +/* { dg-options "-O2 -fdump-rtl-ce1" } */ /* Check code generation for one's complement version of abs */ @@ -13,3 +9,5 @@ int onecmplabs(int x) x = ~x; return x; } + +/* { dg-final { scan-rtl-dump "succeeded through noce_try_abs" "ce1" } } */