diff mbox

[testsuite] Fix ifcvt-4.c for PowerPC

Message ID 56E71DA9.3060002@linux.vnet.ibm.com
State New
Headers show

Commit Message

Pat Haugen March 14, 2016, 8:23 p.m. UTC
As stated in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68232, this 
test needs -misel on powerpc to pass. Verified the following fixes the 
test on both powerpc64/powerpc64le. Ok for trunk?

-Pat

testsuite/ChangeLog:
2016-03-14  Pat Haugen  <pthaugen@us.ibm.com>

         * gcc.dg/ifcvt-4.c: Add -misel for powerpc* and remove skip for 
powerpc64le.



  int
  foo (int x, int y, int a)

Comments

Jeff Law March 14, 2016, 11:35 p.m. UTC | #1
On 03/14/2016 02:23 PM, Pat Haugen wrote:
> As stated in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68232, this
> test needs -misel on powerpc to pass. Verified the following fixes the
> test on both powerpc64/powerpc64le. Ok for trunk?
>
> -Pat
>
> testsuite/ChangeLog:
> 2016-03-14  Pat Haugen  <pthaugen@us.ibm.com>
>
>          * gcc.dg/ifcvt-4.c: Add -misel for powerpc* and remove skip for
> powerpc64le.
OK.
jeff
David Edelsohn March 14, 2016, 11:40 p.m. UTC | #2
On Mon, Mar 14, 2016 at 7:35 PM, Jeff Law <law@redhat.com> wrote:
> On 03/14/2016 02:23 PM, Pat Haugen wrote:
>>
>> As stated in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68232, this
>> test needs -misel on powerpc to pass. Verified the following fixes the
>> test on both powerpc64/powerpc64le. Ok for trunk?
>>
>> -Pat
>>
>> testsuite/ChangeLog:
>> 2016-03-14  Pat Haugen  <pthaugen@us.ibm.com>
>>
>>          * gcc.dg/ifcvt-4.c: Add -misel for powerpc* and remove skip for
>> powerpc64le.
>
> OK.
> jeff

The change is going to fail on PowerPC systems that don't support
ISEL, so it needs to be adjusted.

- David
David Edelsohn March 15, 2016, 2:12 p.m. UTC | #3
On Mon, Mar 14, 2016 at 4:23 PM, Pat Haugen <pthaugen@linux.vnet.ibm.com> wrote:
> As stated in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68232, this test
> needs -misel on powerpc to pass. Verified the following fixes the test on
> both powerpc64/powerpc64le. Ok for trunk?
>
> -Pat
>
> testsuite/ChangeLog:
> 2016-03-14  Pat Haugen  <pthaugen@us.ibm.com>
>
>         * gcc.dg/ifcvt-4.c: Add -misel for powerpc* and remove skip for
> powerpc64le.

The -misel flag will override the code generation, even if the
architecture setting doesn't support the instruction.  I guess this is
good enough for the compile-only test.

This is okay.

Thanks, David
diff mbox

Patch

Index: testsuite/gcc.dg/ifcvt-4.c
===================================================================
--- testsuite/gcc.dg/ifcvt-4.c	(revision 234189)
+++ testsuite/gcc.dg/ifcvt-4.c	(working copy)
@@ -1,5 +1,6 @@ 
  /* { dg-options "-fdump-rtl-ce1 -O2 --param 
max-rtl-if-conversion-insns=3" } */
-/* { dg-skip-if "Multiple set if-conversion not guaranteed on all 
subtargets" { "arm*-*-* powerpc64le*-*-* visium-*-*" } {"*"} { "" } }  */
+/* { dg-additional-options "-misel" { target { powerpc*-*-* } } } */
+/* { dg-skip-if "Multiple set if-conversion not guaranteed on all 
subtargets" { "arm*-*-* visium-*-*" } {"*"} { "" } }  */