gcc/
PR target/23435
* m68k.md (zero_extendsidi2): Force operands[1] to a register
if both operands[0] and operands[1] are memory.
gcc/testsuite/
PR target/23435
* gcc.c-torture/compile/pr23435.c: New.
From-SVN: r107373
+2005-11-22 Kazu Hirata <kazu@codesourcery.com>
+
+ PR target/23435
+ * m68k.md (zero_extendsidi2): Force operands[1] to a register
+ if both operands[0] and operands[1] are memory.
+
2005-11-22 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23606
[(set (match_operand:DI 0 "nonimmediate_operand" "")
(zero_extend:DI (match_operand:SI 1 "nonimmediate_src_operand" "")))]
""
- "")
+{
+ if (GET_CODE (operands[0]) == MEM
+ && GET_CODE (operands[1]) == MEM)
+ operands[1] = force_reg (SImode, operands[1]);
+})
(define_insn_and_split "*zero_extendsidi2"
[(set (match_operand:DI 0 "nonimmediate_operand" "")
+2005-11-22 Kazu Hirata <kazu@codesourcery.com>
+
+ PR target/23435
+ * gcc.c-torture/compile/pr23435.c: New.
+
2005-11-22 Joseph S. Myers <joseph@codesourcery.com>
* gcc.c-torture/execute/floatunsisf-1.c: New test.
--- /dev/null
+/* PR target/23435.
+
+ On m68k-none-elf, this used to cause an unrecognized insn because
+ zero_extendsidi2 accepted operands that are both memory even though
+ such a pattern did not exist. */
+
+void
+foo (unsigned long *a, unsigned long long *p)
+{
+ *p = *a;
+}