From: Richard Sandiford Date: Wed, 26 Jul 2006 13:34:17 +0000 (+0000) Subject: re PR middle-end/28402 (Doubleword shifts implemented using word_mode libcalls) X-Git-Tag: releases/gcc-4.0.4~497 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a11abe1b76ef18498d654f577f52467dc4a05222;p=thirdparty%2Fgcc.git re PR middle-end/28402 (Doubleword shifts implemented using word_mode libcalls) gcc/ PR middle-end/28402 * optabs.c (expand_binop): Pass next_methods rather than methods to expand_doubleword_shift. gcc/testsuite/ PR middle-end/28402 * gcc.dg/pr28402.c: New test. From-SVN: r115757 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c2e679a10af3..e13933b03fa0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-07-26 Richard Sandiford + + PR middle-end/28402 + * optabs.c (expand_binop): Pass next_methods rather than methods + to expand_doubleword_shift. + 2006-07-18 Volker Reichelt PR c/28286 diff --git a/gcc/optabs.c b/gcc/optabs.c index 92347934fd8f..26998381f910 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1148,7 +1148,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, if (expand_doubleword_shift (op1_mode, binoptab, outof_input, into_input, op1, outof_target, into_target, - unsignedp, methods, shift_mask)) + unsignedp, next_methods, shift_mask)) { insns = get_insns (); end_sequence (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7c765eabf16b..3ebcd0f88159 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-26 Richard Sandiford + + PR middle-end/28402 + * gcc.dg/pr28402.c: New test. + 2006-07-24 Volker Reichelt PR c++/27572 diff --git a/gcc/testsuite/gcc.dg/pr28402.c b/gcc/testsuite/gcc.dg/pr28402.c new file mode 100644 index 000000000000..1368ac723b90 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28402.c @@ -0,0 +1,22 @@ +/* { dg-options "" } */ +typedef long long ll; +typedef unsigned long long ull; + +int global; + +#define A(BASE, OP, AMT) \ + ll BASE ## AMT (ll x) { return x OP AMT; } \ + ull BASE ## AMT ## u (ull x) { return x OP AMT; } + +#define B(BASE, OP) \ + A (BASE, OP, 1) \ + A (BASE, OP, 10) \ + A (BASE, OP, 31) \ + A (BASE, OP, 33) \ + A (BASE, OP, 61) \ + A (BASE, OP, global) + +B (left, <<) +B (right, >>) + +/* { dg-final { scan-assembler-not "__\[a-z\]*si3" } } */