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
This commit is contained in:
Kazu Hirata 2003-08-21 13:13:18 +00:00 committed by Kazu Hirata
parent 7bc224514a
commit 43c446b86f
4 changed files with 34 additions and 37 deletions

View File

@ -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.

View File

@ -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"))]
""

View File

@ -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

View File

@ -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;
}