Support "andhi/andsi/anddi" as a zero-extending move.
gcc/ 2010-10-08 H.J. Lu <hongjiu.lu@intel.com> PR target/45913 * config/i386/i386.c (ix86_binary_operator_ok): Support "andhi/andsi/anddi" as a zero-extending move. gcc/testsuite/ 2010-10-08 H.J. Lu <hongjiu.lu@intel.com> PR target/45913 * gcc.target/i386/pr45913.c: New. From-SVN: r165215
This commit is contained in:
parent
73d5e77082
commit
c2c795ff32
|
@ -1,3 +1,9 @@
|
|||
2010-10-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/45913
|
||||
* config/i386/i386.c (ix86_binary_operator_ok): Support
|
||||
"andhi/andsi/anddi" as a zero-extending move.
|
||||
|
||||
2010-10-08 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* builtins.c (fold_call_stmt): Don't copy gimple call arguments
|
||||
|
|
|
@ -14987,7 +14987,16 @@ ix86_binary_operator_ok (enum rtx_code code, enum machine_mode mode,
|
|||
|
||||
/* Source 1 cannot be a non-matching memory. */
|
||||
if (MEM_P (src1) && !rtx_equal_p (dst, src1))
|
||||
return false;
|
||||
{
|
||||
/* Support "andhi/andsi/anddi" as a zero-extending move. */
|
||||
return (code == AND
|
||||
&& (mode == HImode
|
||||
|| mode == SImode
|
||||
|| (TARGET_64BIT && mode == DImode))
|
||||
&& CONST_INT_P (src2)
|
||||
&& (INTVAL (src2) == 0xff
|
||||
|| INTVAL (src2) == 0xffff));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-10-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/45913
|
||||
* gcc.target/i386/pr45913.c: New.
|
||||
|
||||
2010-10-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/45943
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* PR target/45913 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops" } */
|
||||
|
||||
extern void bar (int, int);
|
||||
|
||||
int ss[128];
|
||||
|
||||
void
|
||||
foo (int i, int j, int k, int *p1, int *p2)
|
||||
{
|
||||
int s[128];
|
||||
__builtin_memcpy (s, ss, sizeof s);
|
||||
|
||||
while (i--)
|
||||
{
|
||||
int a = s[i];
|
||||
while (j--)
|
||||
bar (k, p2[a]);
|
||||
j = s[i] & 0xFF;
|
||||
bar (p1[a], k);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue