From 5acb7dec009437cfde1ae78fde0747424d6d53c8 Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Thu, 16 Dec 2010 05:10:18 +0000 Subject: [PATCH] re PR target/46883 (GCC ICE with error: unrecognizable insn) 2010-12-16 Chung-Lin Tang PR target/46883 * config/arm/arm.md (zero_extendhisi2 for register input splitter): Change "register_operand" to "s_register_operand". (zero_extendqisi2 for register input splitter): Same. testsuite/ * gcc.target/arm/pr46883.c: New testcase. From-SVN: r167900 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/arm.md | 8 ++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/pr46883.c | 16 ++++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/arm/pr46883.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57de984bcc2..d9238215dfa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-12-16 Chung-Lin Tang + + PR target/46883 + * config/arm/arm.md + (zero_extendhisi2 for register input splitter): Change + "register_operand" to "s_register_operand". + (zero_extendqisi2 for register input splitter): Same. + 2010-12-16 Jan Hubicka PR middle-end/46939 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 889b86ff764..20431d30103 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -4137,8 +4137,8 @@ }) (define_split - [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI (match_operand:HI 1 "register_operand" "")))] + [(set (match_operand:SI 0 "s_register_operand" "") + (zero_extend:SI (match_operand:HI 1 "s_register_operand" "")))] "!TARGET_THUMB2 && !arm_arch6" [(set (match_dup 0) (ashift:SI (match_dup 2) (const_int 16))) (set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 16)))] @@ -4244,8 +4244,8 @@ }) (define_split - [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI (match_operand:QI 1 "register_operand" "")))] + [(set (match_operand:SI 0 "s_register_operand" "") + (zero_extend:SI (match_operand:QI 1 "s_register_operand" "")))] "!arm_arch6" [(set (match_dup 0) (ashift:SI (match_dup 2) (const_int 24))) (set (match_dup 0) (lshiftrt:SI (match_dup 0) (const_int 24)))] diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 18e3107dff9..d13adc36e51 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-12-16 Chung-Lin Tang + + PR target/46883 + * gcc.target/arm/pr46883.c: New testcase. + 2010-12-16 Jan Hubicka PR lto/46976 diff --git a/gcc/testsuite/gcc.target/arm/pr46883.c b/gcc/testsuite/gcc.target/arm/pr46883.c new file mode 100644 index 00000000000..c85b902d5f4 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr46883.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -march=armv5te" } */ + +void bar (unsigned char *q, unsigned short *data16s, int len) +{ + int i; + + for (i = 0; i < len; i++) + { + q[2 * i] = + (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF)) & 0xFF; + q[2 * i + 1] = + ((unsigned short) + (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF))) >> 8; + } +} -- 2.11.4.GIT