[arm] Convert gcc.target/arm/stl-cond.c into an RTL test
commit18a36c0db5f9e02dea286be5c3aa2c8f0db2ef10
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2018 11:30:35 +0000 (17 11:30 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2018 11:30:35 +0000 (17 11:30 +0000)
tree014051113eb71e16341ddf38087965e72767dacf
parent05d4b1231bdb1b61b6c83627488da80bf855f3e3
[arm] Convert gcc.target/arm/stl-cond.c into an RTL test

This is an awkward testsuite failure. The original bug was that we were failing to put out
the conditional code in the conditional form of the STL instruction (oops!).
So we wanted to output STLNE, but instead output STL.
The testacase relies on if-conversion to conditionalise the insn for STL.
However, ever since r251643 the expansion of a non-relaxed atomic store
always includes a compiler barrier. That blocks if-conversion in all cases.

So there's no easy way to get to a conditional STL instruction from a C program.
But we do want to test for the original bug fix that if the RTL insn for STL is conditionalised
it should output the conditional code.

The solution in this patch is to convert the test into an RTL test with the COND_EXEC form
of the STL insn and scan the assembly output there.
This seems to work fine, and gives us an opportunity to create a gcc.dg/rtl/arm directory
in the RTL tests.

This now makes the gcc.target/arm/stl-cond.c disappear (as the test is deleted) and
the new test in gcc.dg/rtl/arm/stl-cond.c passes.

     * gcc.dg/rtl/arm/stl-cond.c: New test.
     * gcc.target/arm/stl-cond.c: Delete.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256785 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/rtl/arm/stl-cond.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/stl-cond.c [deleted file]