Patchwork [x86] Use vector moves in memmove expanding

login
register
mail settings
Submitter Michael Zolotukhin
Date Sept. 9, 2013, 7:23 a.m.
Message ID <20130909072317.GA53568@msticlxl57.ims.intel.com>
Download mbox | patch
Permalink /patch/273503/
State New
Headers show

Comments

Michael Zolotukhin - Sept. 9, 2013, 7:23 a.m.
Hi HJ,
You were right, and the change from epilogue_size_needed to size_needed was the
rootcause of the bug.
Here is the obvious fix for that, regtested and bootstrapped on i386/x86_64.

Is it OK for trunk?

Changelog:
2013-09-09  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>

	* config/i386/i386.c (ix86_expand_movmem): Fix epilogue generation.

---
Thanks, Michael
Jan Hubicka - Sept. 9, 2013, 7:24 a.m.
> Hi HJ,
> You were right, and the change from epilogue_size_needed to size_needed was the
> rootcause of the bug.
> Here is the obvious fix for that, regtested and bootstrapped on i386/x86_64.
> 
> Is it OK for trunk?
> 
> Changelog:
> 2013-09-09  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
> 
> 	* config/i386/i386.c (ix86_expand_movmem): Fix epilogue generation.

OK,
Would you mind adding a testcase?
Honza

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e2fa71a..1f07e6f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -23329,7 +23329,7 @@  ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
 
   if (count_exp != const0_rtx && epilogue_size_needed > 1)
     expand_movmem_epilogue (dst, src, destreg, srcreg, count_exp,
-			    size_needed);
+			    epilogue_size_needed);
   if (jump_around_label)
     emit_label (jump_around_label);
   return true;