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
+2018-11-13 Alan Modra <amodra@gmail.com>
+
+ * config/rs6000/predicates.md (logical_const_operand),
+ (logical_operand): Correct comment.
+
2018-11-13 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
&& !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")
{
})
;; 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")))
+2018-11-13 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/rotmask.c: New.
+
2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/86677
--- /dev/null
+/* { 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;
+}