Message ID | 001901d97bb6$a001ff10$e005fd30$@nextmovesoftware.com |
---|---|
State | New |
Headers | show |
Series | [Committed] Update xstormy16's neghi2 pattern to not clobber the carry flag. | expand |
diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index be1ee04..91e4bb1 100644 --- a/gcc/config/stormy16/stormy16.md +++ b/gcc/config/stormy16/stormy16.md @@ -519,11 +519,10 @@ ;; Negation (define_insn "neghi2" - [(parallel [(set (match_operand:HI 0 "register_operand" "=r") - (neg:HI (match_operand:HI 1 "register_operand" "0"))) - (clobber (reg:BI CARRY_REG))])] + [(set (match_operand:HI 0 "register_operand" "=r") + (neg:HI (match_operand:HI 1 "register_operand" "0")))] "" - "not %0 | add %0,#1" + "not %0 | inc %0" [(set_attr "length" "4")]) ;; :::::::::::::::::::: diff --git a/gcc/testsuite/gcc.target/xstormy16/neghi2.c b/gcc/testsuite/gcc.target/xstormy16/neghi2.c index dd3dd1e..101c6da 100644 --- a/gcc/testsuite/gcc.target/xstormy16/neghi2.c +++ b/gcc/testsuite/gcc.target/xstormy16/neghi2.c @@ -5,4 +5,4 @@ short neg(short x) { return -x; } -/* { dg-final { scan-assembler "not r2 | add r2,#1" } } */ +/* { dg-final { scan-assembler "not r2 | inc r2" } } */