Message ID | mvm8uouzeol.fsf@hawking.suse.de |
---|---|
State | New |
Headers | show |
diff --git a/gcc/testsuite/gcc.target/m68k/pr54555.c b/gcc/testsuite/gcc.target/m68k/pr54555.c new file mode 100644 index 0000000..4be704b --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/pr54555.c @@ -0,0 +1,13 @@ +/* PR rtl-optimization/54555 + Test that postreload does not shorten the load of small constants to + use move.b instead of moveq. */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "move\\.?b" } } */ + +void foo (void); +void bar (int a) +{ + if (a == 16 || a == 23) foo (); + if (a == -110 || a == -128) foo (); +}