diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-17 15:29:19 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-17 15:29:19 +0000 |
commit | 362719194246abdf7c193bc9fffbe9819009fa9f (patch) | |
tree | 8cfddf5a3cfaa67dde48fbb4db6998a680d1afed | |
parent | 45d36c6d9f3836ff2421a91f7e3fbd98ab205734 (diff) | |
download | gcc-362719194246abdf7c193bc9fffbe9819009fa9f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115524 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/optabs.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr28402.c | 43 |
4 files changed, 55 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a142d644e7..e9dba8e4995 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-07-17 Richard Sandiford <richard@codesourcery.com> + + PR middle-end/28402 + * optabs.c (expand_binop): Pass next_methods rather than methods + to expand_doubleword_shift. + 2006-07-17 J"orn Rennecke <joern.rennecke@st.com> PR other/28251 diff --git a/gcc/optabs.c b/gcc/optabs.c index a961bd49b53..a8be6f98ce3 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1558,7 +1558,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 256bd1c80d8..e79fd296a7e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-17 Richard Sandiford <richard@codesourcery.com> + + PR middle-end/28402 + * gcc.dg/pr28402.c: New test. + 2006-07-17 Steve Ellcey <sje@cup.hp.com> PR c++/28304 diff --git a/gcc/testsuite/gcc.dg/pr28402.c b/gcc/testsuite/gcc.dg/pr28402.c new file mode 100644 index 00000000000..1390ecaf244 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28402.c @@ -0,0 +1,43 @@ +/* { 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" } } */ +typedef unsigned 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" } } */ |