gcc/ChangeLog:
2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/78748
* config/s390/s390.md ("*andc_split_<mode>"): Allow memory destination
only if it coincides with operand 2.
gcc/testsuite/ChangeLog:
2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/78748
* gcc.c-torture/compile/pr78748.c: New test.
From-SVN: r243793
+2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ PR target/78748
+ * config/s390/s390.md ("*andc_split_<mode>"): Allow memory destination
+ only if it coincides with operand 2.
+
2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
* combine.c (change_zero_ext): Skip generation of redundant AND.
(and:GPR (not:GPR (match_operand:GPR 1 "nonimmediate_operand" ""))
(match_operand:GPR 2 "general_operand" "")))
(clobber (reg:CC CC_REGNUM))]
- "! reload_completed && s390_logical_operator_ok_p (operands)"
+ "! reload_completed
+ && (GET_CODE (operands[0]) != MEM
+ /* Ensure that s390_logical_operator_ok_p will succeed even
+ on the split xor if (b & a) is stored into a pseudo. */
+ || rtx_equal_p (operands[0], operands[2]))"
"#"
"&& 1"
[
+2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ PR target/78748
+ * gcc.c-torture/compile/pr78748.c: New test.
+
2016-12-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/78848
--- /dev/null
+/* PR target/78748 */
+/* { dg-options "-march=zEC12" { target { s390*-*-* } } } */
+
+void
+foo (int *p, int *q)
+{
+ *q = *p & ~*q;
+}
+
+void
+bar (int *p, int *q)
+{
+ *q = ~*p & *q;
+}