diff options
author | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-06-20 10:27:32 +0000 |
---|---|---|
committer | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-06-20 10:27:32 +0000 |
commit | 434ca1d9a3d1a67e41fb934518b121a480f32d2e (patch) | |
tree | 0cdbdef246e277407b19d9d082f447de512ac525 | |
parent | 760680df9dc3ac271093974b085b32f005358f0a (diff) | |
download | gcc-434ca1d9a3d1a67e41fb934518b121a480f32d2e.tar.gz |
PR target/80970
* config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
instead of "+d".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@249402 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.md | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr80970.c | 13 |
3 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1b4b8bfcc1..b23ab131099 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-06-20 Andreas Schwab <schwab@suse.de> + + PR target/80970 + * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d" + instead of "+d". + 2017-06-19 James Greenhalgh <james.greenhalgh@arm.com> Backport from mainline diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 5bf6c92d3d5..7933f8eb253 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -5337,7 +5337,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bsetdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (ior:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5350,7 +5350,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bchgdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (xor:SI (ashift:SI (const_int 1) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) @@ -5363,7 +5363,7 @@ [(set_attr "type" "bitrw")]) (define_insn "*bclrdreg" - [(set (match_operand:SI 0 "register_operand" "+d") + [(set (match_operand:SI 0 "register_operand" "=d") (and:SI (rotate:SI (const_int -2) (and:SI (match_operand:SI 1 "register_operand" "d") (const_int 31))) diff --git a/gcc/testsuite/gcc.dg/torture/pr80970.c b/gcc/testsuite/gcc.dg/torture/pr80970.c new file mode 100644 index 00000000000..3b96b581e33 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr80970.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ + +int a, b, c, d, e; +void f () +{ + long g, h; + if (c) + e = d; + g = d & 31; + h = 1 << g; + a = e | h; + b = a; +} |