Adjust destination address after gen_strset
gcc/ PR target/59363 * config/i386/i386.c (emit_memset): Adjust destination address after gen_strset. (expand_setmem_epilogue): Likewise. gcc/testsuite/ PR target/59363 * gcc.target/i386/pr59363.c: New file. From-SVN: r205630
This commit is contained in:
parent
ddc923b52d
commit
3848839d3e
@ -1,3 +1,10 @@
|
||||
2013-12-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/59363
|
||||
* config/i386/i386.c (emit_memset): Adjust destination address
|
||||
after gen_strset.
|
||||
(expand_setmem_epilogue): Likewise.
|
||||
|
||||
2013-12-03 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/56344
|
||||
|
@ -22854,6 +22854,8 @@ emit_memset (rtx destmem, rtx destptr, rtx promoted_val,
|
||||
if (piece_size <= GET_MODE_SIZE (word_mode))
|
||||
{
|
||||
emit_insn (gen_strset (destptr, dst, promoted_val));
|
||||
dst = adjust_automodify_address_nv (dst, move_mode, destptr,
|
||||
piece_size);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -22923,14 +22925,18 @@ expand_setmem_epilogue (rtx destmem, rtx destptr, rtx value, rtx vec_value,
|
||||
{
|
||||
dest = change_address (destmem, DImode, destptr);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
dest = adjust_automodify_address_nv (dest, DImode, destptr, 8);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
}
|
||||
else
|
||||
{
|
||||
dest = change_address (destmem, SImode, destptr);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
dest = adjust_automodify_address_nv (dest, SImode, destptr, 4);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
dest = adjust_automodify_address_nv (dest, SImode, destptr, 8);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
dest = adjust_automodify_address_nv (dest, SImode, destptr, 12);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
}
|
||||
emit_label (label);
|
||||
@ -22948,6 +22954,7 @@ expand_setmem_epilogue (rtx destmem, rtx destptr, rtx value, rtx vec_value,
|
||||
{
|
||||
dest = change_address (destmem, SImode, destptr);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
dest = adjust_automodify_address_nv (dest, SImode, destptr, 4);
|
||||
emit_insn (gen_strset (destptr, dest, value));
|
||||
}
|
||||
emit_label (label);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-12-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/59363
|
||||
* gcc.target/i386/pr59363.c: New file.
|
||||
|
||||
2013-12-03 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c/59351
|
||||
|
24
gcc/testsuite/gcc.target/i386/pr59363.c
Normal file
24
gcc/testsuite/gcc.target/i386/pr59363.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* PR target/59363 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -mtune=amdfam10" } */
|
||||
|
||||
typedef struct {
|
||||
int ctxlen;
|
||||
long interhunkctxlen;
|
||||
int flags;
|
||||
long find_func;
|
||||
void *find_func_priv;
|
||||
int hunk_func;
|
||||
} xdemitconf_t;
|
||||
|
||||
__attribute__((noinline))
|
||||
int xdi_diff(xdemitconf_t *xecfg) {
|
||||
if (xecfg->hunk_func == 0)
|
||||
__builtin_abort();
|
||||
return 0;
|
||||
}
|
||||
int main() {
|
||||
xdemitconf_t xecfg = {0};
|
||||
xecfg.hunk_func = 1;
|
||||
return xdi_diff(&xecfg);
|
||||
}
|
Loading…
Reference in New Issue
Block a user