rs6000: Testcases for rl*i*
authorSegher Boessenkool <segher@kernel.crashing.org>
Tue, 29 Nov 2016 05:51:51 +0000 (06:51 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Tue, 29 Nov 2016 05:51:51 +0000 (06:51 +0100)
commit01a8a373399f292d15f3ac882add6c585315a0cb
tree684ce65515a5774707eab3eff41edf7185a420b5
parent452385a7205e963d02890bae566ba523a977c877
rs6000: Testcases for rl*i*

These testcases test that we generate the expected code for all of the
rl*i* instructions, that is, rotate-and-mask and rotate-and-mask-insert
for immediate rotation counts.  All the testcases do rotate, shift left,
as well as shift right; if that results in an instruction that does not
exist the testcases generate a multiplication instead, so that we can
detect if this is handled properly.

Many 32-bit instructions zero-extend their result properly in 64-bit
mode, but the rs6000 port does not yet know.  These testcases test the
status quo, so they will need updating when ever we handle this.

gcc/testsuite/
* gcc.target/powerpc/rldic-0.c: New testcase.
* gcc.target/powerpc/rldic-1.c: New testcase.
* gcc.target/powerpc/rldic-2.c: New testcase.
* gcc.target/powerpc/rldicl-0.c: New testcase.
* gcc.target/powerpc/rldicl-1.c: New testcase.
* gcc.target/powerpc/rldicl-2.c: New testcase.
* gcc.target/powerpc/rldicr-0.c: New testcase.
* gcc.target/powerpc/rldicr-1.c: New testcase.
* gcc.target/powerpc/rldicr-2.c: New testcase.
* gcc.target/powerpc/rldicx.h: New file.
* gcc.target/powerpc/rldimi-0.c: New testcase.
* gcc.target/powerpc/rldimi-1.c: New testcase.
* gcc.target/powerpc/rldimi-2.c: New testcase.
* gcc.target/powerpc/rldimi.h: New file.
* gcc.target/powerpc/rlwimi-0.c: New testcase.
* gcc.target/powerpc/rlwimi-1.c: New testcase.
* gcc.target/powerpc/rlwimi-2.c: New testcase.
* gcc.target/powerpc/rlwimi.h: New file.
* gcc.target/powerpc/rlwinm-0.c: New testcase.
* gcc.target/powerpc/rlwinm-1.c: New testcase.
* gcc.target/powerpc/rlwinm-2.c: New testcase.
* gcc.target/powerpc/rlwinm.h: New file.

From-SVN: r242951
23 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/rldic-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldic-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldic-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicl-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicl-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicl-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicr-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicr-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicr-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldicx.h [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldimi-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldimi-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldimi-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rldimi.h [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwimi-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwimi-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwimi-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwimi.h [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwinm-0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwinm-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwinm-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/rlwinm.h [new file with mode: 0644]