diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2005-11-22 20:42:54 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-11-22 20:42:54 +0000 |
commit | 04760127ae09989f69c8edccc911862fadf57b3c (patch) | |
tree | bc3ecaad2ce049c2bcd8af250ae3c5885e3de1a4 | |
parent | b4623110c4dd0dd7b29ae13180e4296735638992 (diff) | |
download | gcc-04760127ae09989f69c8edccc911862fadf57b3c.zip gcc-04760127ae09989f69c8edccc911862fadf57b3c.tar.gz gcc-04760127ae09989f69c8edccc911862fadf57b3c.tar.bz2 |
re PR target/23435 (Unrecognizable insn (in extract_insn, at recog.c))
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.md | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr23435.c | 11 |
4 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f16711a..39501c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 1a4df3b..8a6a555 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -1206,7 +1206,11 @@ [(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" "") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c75ea54..ae58dc0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23435.c b/gcc/testsuite/gcc.c-torture/compile/pr23435.c new file mode 100644 index 0000000..fb41af1e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr23435.c @@ -0,0 +1,11 @@ +/* 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; +} |