diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-08-21 13:13:18 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-08-21 13:13:18 +0000 |
commit | 43c446b86f329c5c20c995f71807662f12468a4c (patch) | |
tree | a0bd6473f2f9f1d04d4d139b9f82a8be7f53935e /gcc | |
parent | 7bc224514a62f563e113042440eb8f3a4088aa83 (diff) | |
download | gcc-43c446b86f329c5c20c995f71807662f12468a4c.zip gcc-43c446b86f329c5c20c995f71807662f12468a4c.tar.gz gcc-43c446b86f329c5c20c995f71807662f12468a4c.tar.bz2 |
re PR target/11805 ([H8300] ICE)
PR target/11805
* config/h8300/h8300.md (two anonymous patterns): Remove.
* testsuite/gcc.c-torture/compile/20030821-1.c: New.
From-SVN: r70643
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 37 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030821-1.c | 24 |
4 files changed, 34 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0537af7..6d8de7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-08-21 Kazu Hirata <kazu@cs.umass.edu> + + PR target/11805 + * config/h8300/h8300.md (two anonymous patterns): Remove. + 2003-08-21 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 8fe7450..b17a03e 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -652,43 +652,6 @@ (match_dup 3)))] "operands[3] = GEN_INT (INTVAL (operands[1]) - 16);") -(define_insn "" - [(set (cc0) - (and:HI (match_operand:HI 0 "register_operand" "r") - (match_operand:HI 1 "single_one_operand" "n")))] - "" - "* -{ - operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); - if (INTVAL (operands[1]) > 128) - { - operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); - return \"btst\\t%V1,%t0\"; - } - return \"btst\\t%V1,%s0\"; -}" - [(set_attr "length" "2") - (set_attr "cc" "set_zn")]) - -(define_insn "" - [(set (cc0) - (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "single_one_operand" "n")))] - "(TARGET_H8300H || TARGET_H8300S) - && (INTVAL (operands[1]) & 0xffff) != 0" - "* -{ - operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); - if (INTVAL (operands[1]) > 128) - { - operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); - return \"btst\\t%V1,%x0\"; - } - return \"btst\\t%V1,%w0\"; -}" - [(set_attr "length" "2") - (set_attr "cc" "set_zn")]) - (define_insn "tstqi" [(set (cc0) (match_operand:QI 0 "register_operand" "r"))] "" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5670652..65d0308 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-08-21 Kazu Hirata <kazu@cs.umass.edu> + + PR target/11805 + * gcc.c-torture/compile/20030821-1.c: New. + 2003-08-20 Mark Mitchell <mark@codesourcery.com> PR c++/11834 diff --git a/gcc/testsuite/gcc.c-torture/compile/20030821-1.c b/gcc/testsuite/gcc.c-torture/compile/20030821-1.c new file mode 100644 index 0000000..34700ae --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030821-1.c @@ -0,0 +1,24 @@ +/* PR target/11805. */ + +/* Consider the following sequence. + + (set (cc0) + (and:HI (reg:HI 0) + (const_int 1))) + + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref 17) + (pc))) + + On h8300, the first insn does not set the overflow flag, but the + second requires the overflow flag. As a result, when the final + wants to output the jump insn, it cannot find a test insn that + gives appropriate condition flags. */ + +unsigned char +foo (unsigned char a) +{ + return (a & 1) > 0; +} |