From: Alan Modra Date: Tue, 13 Nov 2018 03:20:22 +0000 (+1030) Subject: [RS6000] Rotate testcase X-Git-Tag: basepoints/gcc-10~3126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21edd5af33efc75544b53977cf9f73dac5181ca5;p=thirdparty%2Fgcc.git [RS6000] Rotate testcase The testcase exercises one of the rotate patterns. gcc/ * config/rs6000/predicates.md (logical_const_operand), (logical_operand): Correct comment. gcc/testsuite/ * gcc.target/powerpc/rotmask.c: New. From-SVN: r266046 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99500638f12a..b2ab5487d556 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-13 Alan Modra + + * config/rs6000/predicates.md (logical_const_operand), + (logical_operand): Correct comment. + 2018-11-13 Alan Modra * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'. diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 40b0114a64f0..b80c278d7424 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -922,7 +922,7 @@ && !satisfies_constraint_L (op)"))) ;; Return 1 if the operand is a constant that can be used as the operand -;; of an OR or XOR. +;; of an AND, OR or XOR. (define_predicate "logical_const_operand" (match_code "const_int") { @@ -935,7 +935,7 @@ }) ;; Return 1 if the operand is a non-special register or a constant that -;; can be used as the operand of an OR or XOR. +;; can be used as the operand of an AND, OR or XOR. (define_predicate "logical_operand" (ior (match_operand 0 "gpc_reg_operand") (match_operand 0 "logical_const_operand"))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cff23eee5a15..e7d4ad7143c2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-11-13 Alan Modra + + * gcc.target/powerpc/rotmask.c: New. + 2018-11-13 Kugan Vivekanandarajah PR middle-end/86677 diff --git a/gcc/testsuite/gcc.target/powerpc/rotmask.c b/gcc/testsuite/gcc.target/powerpc/rotmask.c new file mode 100644 index 000000000000..4d1b91749218 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/rotmask.c @@ -0,0 +1,8 @@ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "rotldi" } } */ + +unsigned long f (unsigned long x) +{ + return ((x << 1) | (x >> 63)) & 0xffffffff; +}