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: r115524
This commit is contained in:
Richard Sandiford 2006-07-17 15:29:19 +00:00 committed by Richard Sandiford
parent 77bffd4cee
commit f8bdb931a9
4 changed files with 55 additions and 1 deletions

View File

@ -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

View File

@ -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 ();

View File

@ -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

View File

@ -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" } } */