[PATCH, rs6000] refactor/cleanup in rs6000-string.c

2018-07-31 Thread Aaron Sawdey
Just teasing things apart a bit more in this function so I can add vec/vsx code generation without making it enormous and incomprehensible. Bootstrap/regtest passes on powerpc64le, ok for trunk? Thanks, Aaron 2018-07-31 Aaron Sawdey * config/rs6000/rs6000-string.c

Re: [Patch,optimization]: Optimized changes in the estimate register pressure cost.

2015-09-28 Thread Aaron Sawdey
d out. size_cost = (estimate_reg_pressure_cost (new_regs[0] + regs_needed[0], regs_used, speed, call_p) - estimate_reg_pressure_cost (new_regs[0], regs_used, speed, call_p)); I'm not quite sure I understand the "why" o

[PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-09-27 Thread Aaron Sawdey
e might_overlap case. Bootstrap/regtest passed on ppc64le, in progress on x86_64. If everything passes, is this ok for trunk? 2019-09-27 Aaron Sawdey * builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm. (expand_builtin_memcpy): Us

[PATCH, RS6000] Add movmemsi pattern for inline expansion of memmove()

2019-09-30 Thread Aaron Sawdey
ress on ppc64le (power9), if tests are ok, is this ok for trunk after the movmem optab patch posted last week is approved? Thanks! Aaron 2019-09-30 Aaron Sawdey * config/rs6000/rs6000-protos.h (expand_block_move): Change prototype. * config/rs6000/rs6000-string.c (expand_b

Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-10-02 Thread Aaron Sawdey
On 10/1/19 4:45 PM, Jeff Law wrote: > On 9/27/19 12:23 PM, Aaron Sawdey wrote: >> This is the third piece of my effort to improve inline expansion of memmove. >> The >> first two parts I posted back in June fixed the names of the optab entries >> involved so that opta

Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-10-02 Thread Aaron Sawdey
On 10/2/19 5:35 PM, Jakub Jelinek wrote: > On Wed, Oct 02, 2019 at 09:21:23AM -0500, Aaron Sawdey wrote: >>>> 2019-09-27 Aaron Sawdey >>>> >>>>* builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm. >>>>

Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-10-03 Thread Aaron Sawdey
On 10/2/19 5:44 PM, Aaron Sawdey wrote: > On 10/2/19 5:35 PM, Jakub Jelinek wrote: >> On Wed, Oct 02, 2019 at 09:21:23AM -0500, Aaron Sawdey wrote: >>>>> 2019-09-27 Aaron Sawdey >>>>> >>>>> * builtins.c (expand_builtin_memory_copy_args):

[PATCH, rs6000] inline expansion of str[n]cmp using vec/vsx instructions

2018-08-22 Thread Aaron Sawdey
ppc64le (power8 and power9). Ok for trunk? Thanks! Aaron 2018-08-22 Aaron Sawdey * config/rs6000/altivec.md (altivec_eq): Remove star. * config/rs6000/rs6000-string.c (do_load_for_compare): Support vector load modes. (expand_strncmp_vec_sequence): New function

[PATCH] reorganize block/string move/compare expansions out of rs6000.c

2017-06-22 Thread Aaron Sawdey
? 2017-06-22  Aaron Sawdey   * config/rs6000/rs6000-string.c (expand_block_clear, do_load_for_compare, select_block_compare_mode, compute_current_alignment, expand_block_compare, expand_strncmp_align_check, expand_strn_compare, expand_block_move

[PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-27 Thread Aaron Sawdey
the only thing they are used for. Bootstrap and regtest passes in trunk 249639 (to avoid the bootstrap fail), ok for trunk? 2017-06-27  Aaron Sawdey   * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base and tocrel_offset be pointer args rather than implicitly using

Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-28 Thread Aaron Sawdey
Hi Segher, On Tue, 2017-06-27 at 18:35 -0500, Segher Boessenkool wrote: > Hi Aaron, > > On Tue, Jun 27, 2017 at 11:43:57AM -0500, Aaron Sawdey wrote: > > The function toc_relative_expr_p implicitly sets two static vars > > (tocrel_base and tocrel_offset) that are decl

Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-29 Thread Aaron Sawdey
On Wed, 2017-06-28 at 18:19 -0500, Segher Boessenkool wrote: > On Wed, Jun 28, 2017 at 03:21:49PM -0500, Aaron Sawdey wrote: > > -toc_relative_expr_p (const_rtx op, bool strict) > > +toc_relative_expr_p (const_rtx op, bool strict, const_rtx > > *tocrel_base_ret, > >

[PATCH] make canonicalize_condition keep its promise

2017-11-15 Thread Aaron Sawdey
counter based loop. If there is a better way to go about this please let me know and I'll revise/retest. Bootstrap and regtest pass on ppc64le and x86_64. Ok for trunk? Thanks, Aaron 2017-11-15  Aaron Sawdey   * rtlanal.c (canonicalize_condition): Return 0 if final rtx d

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-20 Thread Aaron Sawdey
On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > > So, the story of this very small patch starts with me adding > > patterns > > for ppc instructions bdz[tf] and bdnz[tf] such as this: > > > >   [(set (pc) >

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-21 Thread Aaron Sawdey
On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > > > > So, the story of this very small patch starts w

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-29 Thread Aaron Sawdey
On Tue, 2017-11-21 at 11:45 -0600, Aaron Sawdey wrote: > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: &

[PATCH] rs6000: Cleanup bdz/bdnz insn/splitter, add new insn/splitter for bdzt/bdzf/bdnzt/bdnzf

2017-11-30 Thread Aaron Sawdey
require the change to canonicalize_condition I posted before thanksgiving to prevent doloop from being confused by bdnzt et. al. Bootstrap/regtest passes on ppc64le. OK for trunk? 2017-11-30 Aaron Sawdey * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it to

[PATCH, rs6000] generate loop code for memcmp inline expansion

2017-12-11 Thread Aaron Sawdey
): New option. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC ToolchainIndex: gcc/config/rs6000/rs6000-string.c === --- gcc/config/rs6000/rs6000

[PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Aaron Sawdey
to the size of the load being done regardless of how many bytes are being used. OK for trunk if bootstrap/regtest passes on ppc64le? 2017-12-12 Aaron Sawdey PR target/82190 * config/rs6000/rs6000-string.c (expand_block_move, expand_strn_compare): fix set_mem_size() calls

Re: [PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2017-12-12 Thread Aaron Sawdey
On Tue, 2017-12-12 at 20:50 +0100, Jakub Jelinek wrote: > On Tue, Dec 12, 2017 at 01:40:41PM -0600, Aaron Sawdey wrote: > > 2017-12-12  Aaron Sawdey   > > > > PR target/82190 > > * config/rs6000/rs6000-string.c (expand_block_move, > > expand_strn_c

[PATCH, rs6000] Allow memmov/memset builtin expansion to use unaligned vsx on p8/p9

2017-12-13 Thread Aaron Sawdey
This patch allows the use of unaligned vsx loads/stores for builtin expansion of memset and memcmp on p8/p9. Performance of unaligned vsx instructions is good on these processors. OK for trunk if bootstrap/regtest on ppc64le passes? 2017-12-13  Aaron Sawdey   * config/rs6000/rs6000

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-14 Thread Aaron Sawdey
On Thu, 2017-12-14 at 13:43 -0700, Jeff Law wrote: > On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > > > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: &g

Re: [PATCH] make canonicalize_condition keep its promise

2018-01-02 Thread Aaron Sawdey
we attach a simple > loop > descriptor to a loop that is not a simple loop. But clearly you > didn't > introduce that oddball behavior. Jeff, Thanks for sticking with this and reviewing, I have re-checked that regstrap still passes and committed as 256079. Aaron -- Aaron Sawde

Re: [PATCH][rs6000][PR target/82190] fix mem size info in rtl generated by memcmp and strncmp/strcmp builtin expansion

2018-01-02 Thread Aaron Sawdey
ot significantly larger. */ - if (TARGET_ALTIVEC && bytes >= 16 && align >= 128) + if (TARGET_ALTIVEC && bytes >= 16 && (TARGET_EFFICIENT_UNALIGNED_VSX || align >= 128)) { move_bytes = 16; mode = V4SImode; --

Re: [PATCH] rs6000: Cleanup bdz/bdnz insn/splitter, add new insn/splitter for bdzt/bdzf/bdnzt/bdnzf

2018-01-08 Thread Aaron Sawdey
ed in this cleanup and addition to the patterns and splitters for the branch decrement instructions as 256344. 2018-01-08 Aaron Sawdey * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it to generate rtl. (cceq_ior_compare_complement): Give it a nam

Re: [PATCH, rs6000] generate loop code for memcmp inline expansion

2018-01-08 Thread Aaron Sawdey
On Tue, 2017-12-12 at 10:13 -0600, Segher Boessenkool wrote: > Please fix those trivialities, and it's okay for trunk (after the > rtlanal patch is approved too). Thanks! Here's the final version of this, which is committed as 256351. 2018-01-08 Aaron Sawdey * conf

[PATCH, rs6000] cleanup/refactor in rs6000-string.c

2018-06-14 Thread Aaron Sawdey
-- ok for trunk? Thanks! Aaron 2018-06-14 Aaron Sawdey * config/rs6000/rs6000-string.c (select_block_compare_mode): Check TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller. (do_and3, do_and3_mask, do_compb3, do_rotl3): New func

[PATCH, rs6000] PR target/86222 fix truncation issue with constants when compiling -m32

2018-06-21 Thread Aaron Sawdey
backport to 8? Thanks, Aaron 2018-06-19 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32 correctly. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC

[PATCH, rs6000] don't use unaligned vsx for memset of less than 32 bytes

2018-06-25 Thread Aaron Sawdey
U2006 runs show the performance regression is fixed. Regstrap passes on powerpc64le, ok for trunk and backport to 8? Thanks, Aaron 2018-06-25 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_block_clear): Don't use unaligned vsx for 16B memset. -- Aaron Sa

Re: [PATCH, rs6000] generate loop code for memcmp inline expansion

2018-01-10 Thread Aaron Sawdey
I'll check the runtime of that --- I added some test cases to memcmp- 1.c and probably it is now taking too long. I will revise it so it's no longer than it was before. Aaron On Wed, 2018-01-10 at 14:25 +, Szabolcs Nagy wrote: > On 08/01/18 19:37, Aaron Sawdey wrote: > &

[PATCH] reduce runtime of gcc.dg/memcmp-1.c test

2018-01-10 Thread Aaron Sawdey
This brings it back not quite to where it was but a lot more reasonable than what I put into 256351. 2018-01-10 Aaron Sawdey * gcc.dg/memcmp-1.c: Reduce runtime to something reasonable. OK for trunk? Thanks, Aaron -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113

[PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-29 Thread Aaron Sawdey
ok on ppc64le and x86_64, ok for trunk? 2018-01-29 Aaron Sawdey * var-tracking.c (vt_add_function_parameter): Fix comparison of rtx. Index: gcc/var-tracking.c === --- gcc/var-tracking.c (revision 257159) +++ gcc/var-tracking.

Re: [PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

2018-01-30 Thread Aaron Sawdey
>args.internal_arg_pointer) > in var-tracking.c. > rs6000/powerpcspe with -fsplit-stack are the only cases where > crtl->args.internal_arg_pointer is not a REG, so just running libgo > testsuite on powerpc{,64,64le} should cover it all. I'll give this a try today when I get to the office. Thanks, Aaron > > Jakub > -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

Re: [PATCH, rs6000][PR debug/83758] v2 rs6000_internal_arg_pointer should only return a register

2018-01-30 Thread Aaron Sawdey
otstrap, go tests run. Segher is currently regtesting on ppc64le power9. OK for trunk if tests pass? 2018-01-30 Aaron Sawdey * config/rs6000/rs6000.c (rs6000_internal_arg_pointer ): Only return a reg rtx. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253

Re: [PATCH][AArch64] PR84114: Avoid reassociating FMA

2018-02-27 Thread Aaron Sawdey
so it would be nice to be able to avoid causing issues as a result of that. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

PR target/84743 adjust reassociation widths for power8/power9

2018-03-12 Thread Aaron Sawdey
% Bottom line is net improvement for CPU2017 int compared with either current trunk, or disabling parallel reassociation. For CPU2017 fp, very small overall degradation. Currently doing regstrap on ppc64le, ok for trunk if results look good? Thanks! Aaron 2018-03-12 Aaron Sawdey

[PATCH, rs6000] PR target/83822 fix redundant conditions

2018-03-29 Thread Aaron Sawdey
I've fixed the redundant conditions in the expressions pointed out by 83822. Bootstrap/regtest passes on ppc64le, ok for trunk? Aaron 2018-03-29 Aaron Sawdey PR target/83822 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant cond

[PATCH rs6000: document options (PR85321)

2018-04-10 Thread Aaron Sawdey
This updates invoke.texi to document -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit, and -mstring-compare-inline-limit. Tested with "make pdf", ok for trunk? 2018-04-10 Aaron Sawdey PR target/85321 * doc/invoke.texi (RS/6000 and PowerPC Options)

[PATCH, committed] Update my MAINTAINERS entry

2018-04-10 Thread Aaron Sawdey
Update to my new email address. Committed as 259301. 2018-04-10 Aaron Sawdey * MAINTAINERS: Update my email address. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC ToolchainIndex: MAINTAINERS

[PATCH, rs6000] PR85321 improve documentation of -mcall and -mtraceback=

2018-04-10 Thread Aaron Sawdey
invoke.texi. This is the last piece for 85321. Testing in progress on linux-ppc64le, ok for trunk if tests are ok? Thanks, Aaron 2018-04-10 Aaron Sawdey PR target/85321 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options -mcall= and -mtraceback. Remove

[PATCH] rs6000 PR83660 fix ICE with vec_extract

2018-04-13 Thread Aaron Sawdey
PR in there, it has side effects and this problem will not occur. Doing bootstrap/regtest on ppc64le with -mcpu=power7 since that is where this issue arises. OK for trunk if everything passes? Thanks, Aaron 2018-04-13 Aaron Sawdey PR target/83660 * config/rs6000/rs600

[PATCH][rs6000][PR target/87474] fix strncmp expansion with -mno-power8-vector

2018-10-01 Thread Aaron Sawdey
PR/87474 happens because I didn't check that both vector and VSX instructions were enabled, so insns that are disabled get generated with -mno-power8-vector. Regstrap passes on ppc64le, ok for trunk? Thanks! Aaron 2018-10-01 Aaron Sawdey PR target/87474 * config/r

Re: [PATCH][rs6000][PR target/87474] fix strncmp expansion with -mno-power8-vector

2018-10-02 Thread Aaron Sawdey
On 10/2/18 3:38 AM, Segher Boessenkool wrote: > On Mon, Oct 01, 2018 at 11:09:44PM -0500, Aaron Sawdey wrote: >> PR/87474 happens because I didn't check that both vector and VSX instructions >> were enabled, so insns that are disabled get generated with >> -mno-po

Re: [PATCH] rs6000 PR83660 fix ICE with vec_extract

2018-04-23 Thread Aaron Sawdey
This also affects gcc 7 and is fixed by the same patch. I've tested the backport to 7 on ppc64le and it causes no new fails. OK for backport to 7 (and 6 if it's also needed there)? Thanks, Aaron On Fri, 2018-04-13 at 15:37 -0500, Aaron Sawdey wrote: > Per the discussion on th

[PATCH][rs6000] avoid using unaligned vsx or lxvd2x/stxvd2x for memcpy/memmove inline expansion

2018-12-19 Thread Aaron Sawdey
://patchwork.ozlabs.org/patch/814059/ OK for trunk if bootstrap/regtest ok? Thanks! Aaron 2018-12-19 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_block_move): Don't use unaligned vsx and avoid lxvd2x/stxvd2x. (gen_lvx_v4si_move): New function. Index: gcc/config/r

Re: [PATCH 2/2] v2: C++: improvements to binary operator diagnostics (PR c++/87504)

2018-12-19 Thread Aaron Sawdey
ee_code, tree, >> enum tree_code, tree, enum tree_code, tree); >> -extern void warn_tautological_cmp (location_t, enum tree_code, tree, tree); >> +extern void warn_tautological_cmp (const op_location_t &, enum tree_code, >> +   tree, tree); >>   extern void warn_logical_not_parentheses (location_t, enum tree_code, tree, >>     tree); >>   extern bool warn_if_unused_value (const_tree, location_t); >> diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c >> index fc7f87c..fce9d84 100644 >> --- a/gcc/c-family/c-warn.c >> +++ b/gcc/c-family/c-warn.c >> @@ -322,7 +322,8 @@ find_array_ref_with_const_idx_r (tree *expr_p, int *, >> void *) >>       if ((TREE_CODE (expr) == ARRAY_REF >> || TREE_CODE (expr) == ARRAY_RANGE_REF) >> -  && TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST) >> +  && (TREE_CODE (tree_strip_any_location_wrapper (TREE_OPERAND (expr, >> 1))) >> +  == INTEGER_CST)) >>   return integer_type_node; > > I think we want fold_for_warn here.  OK with that change (assuming it passes). > > Jason > -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

Re: [PATCH] -Wtautological-compare: fix comparison of macro expansions

2018-12-20 Thread Aaron Sawdey
it to trunk as r267299. > > Aaron, does this fix the issue you saw? > > Thanks, and sorry again about the breakage. > Dave > Dave, Thanks for the quick response, the build issue is fixed with r267299. Aaron -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (5

Re: [PATCH][rs6000] avoid using unaligned vsx or lxvd2x/stxvd2x for memcpy/memmove inline expansion

2018-12-20 Thread Aaron Sawdey
On 12/20/18 3:51 AM, Segher Boessenkool wrote: > On Wed, Dec 19, 2018 at 01:53:05PM -0600, Aaron Sawdey wrote: >> Because of POWER9 dd2.1 issues with certain unaligned vsx instructions >> to cache inhibited memory, here is a patch that keeps memmove (and memcpy) >> inline

Re: [PATCH][rs6000] avoid using unaligned vsx or lxvd2x/stxvd2x for memcpy/memmove inline expansion

2018-12-20 Thread Aaron Sawdey
On 12/20/18 5:44 PM, Segher Boessenkool wrote: > On Thu, Dec 20, 2018 at 05:34:54PM -0600, Aaron Sawdey wrote: >> On 12/20/18 3:51 AM, Segher Boessenkool wrote: >>> On Wed, Dec 19, 2018 at 01:53:05PM -0600, Aaron Sawdey wrote: >>>> Because of POWER9 dd2.1 iss

[PATCH][rs6000] improve gpr inline expansion of str[n]cmp

2018-10-25 Thread Aaron Sawdey
is faster for long strings that do not differ, but that isn't important because if vsx is enabled, the gpr sequence is only used for 15 bytes or less. Bootstrap/regtest passes on ppc64le (power8, power9), ppc64 (power8) and ppc32 (power8). Ok for trunk? Thanks, Aaron 2018-10-25 Aaron S

[PATCH][rs6000] use index form addresses more often for ldbrx/stdbrx

2018-10-27 Thread Aaron Sawdey
ut I have other cases where it will update them if there is more register pressure. in either case the code is more compact and makes full use of the indexed addressing of ldbrx. Bootstrap/regtest passed on ppc64le targeting power7/power8/power9, ok for trunk? Thanks! Aaron 2018-10-27 Aa

Re: [PATCH][rs6000] use index form addresses more often for ldbrx/stdbrx

2018-10-29 Thread Aaron Sawdey
On 10/27/18 12:52 PM, Segher Boessenkool wrote: > Hi Aaron, > > On Sat, Oct 27, 2018 at 11:20:01AM -0500, Aaron Sawdey wrote: >> --- gcc/config/rs6000/rs6000.md (revision 265393) >> +++ gcc/config/rs6000/rs6000.md (working copy) >> @@ -2512,9 +2512,27 @@

Re: [PATCH][rs6000] use index form addresses more often for ldbrx/stdbrx

2018-10-30 Thread Aaron Sawdey
I had to make one more change to make this actually work. In rs6000_force_indexed_or_indirect_mem() it was necessary to return the updated rtx. Bootstrap/regtest passes on ppc64le (power7, power9), ok for trunk? Thanks! Aaron 2018-10-30 Aaron Sawdey * config/rs6000/rs6000.md

[PATCH][rs6000] cleanup and rename rs6000_address_for_fpconvert

2018-11-01 Thread Aaron Sawdey
incoming rtx which matches what the insns this is used to prepare for are using as their predicate. Bootstrap/regtest passes on ppc64le (power7, power9), ok for trunk? 2018-11-01 Aaron Sawdey * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove prototype

[PATCH][rs6000] fix ICE for strncmp expansion on power6

2018-11-02 Thread Aaron Sawdey
(load_mode, tmp_reg_src2, addr2, orig_src2); /* We must always left-align the data we read, and -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

[PATCH][rs6000] use index form addresses more often for l[wh]brx/st[wh]brx

2018-11-05 Thread Aaron Sawdey
power8/power9, ok for trunk? Thanks! Aaron 2018-11-05 Aaron Sawdey * config/rs6000/rs6000.md (bswap2): Force address into register if not in indexed or indirect form. (bswap2_load): Change predicate to indexed_or_indirect_operand. (bswap2_store): Ditto

[PATCH][rs6000] inline expansion of memcmp using vsx

2018-11-14 Thread Aaron Sawdey
r than the gpr inline code if the strings are equal and is comparable if the strings have a 10% chance of being equal (spread across the string). Currently regtesting, ok for trunk if tests pass? Thanks! Aaron 2018-11-14 Aaron Sawdey * config/rs6000/rs6000-string.c (emit_vsx_zero

Re: [PATCH][rs6000] inline expansion of memcmp using vsx

2018-11-15 Thread Aaron Sawdey
On 11/15/18 4:02 AM, Richard Biener wrote: > On Wed, Nov 14, 2018 at 5:43 PM Aaron Sawdey wrote: >> >> This patch generalizes some the functions added earlier to do vsx expansion >> of strncmp >> so that the can also generate the code needed for memcmp. I reorganized

[PATCH][rs6000] better use of unaligned vsx in memset() expansion

2018-11-26 Thread Aaron Sawdey
d vsx for the last 32 bytes of any block being cleared. So this change puts the test up front so it is not affected by the decrement of bytes. OK for trunk if regstrap passes? Thanks! Aaron 2018-11-26 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_block_clear): Chang

Re: [PATCH][rs6000][8 backport] improve gpr inline expansion of str[n]cmp

2018-11-26 Thread Aaron Sawdey
gtest on a couple different ppc64 architectures (unless anyone has any objections). Thanks, Aaron 2018-11-26 Aaron Sawdey Backport from mainline 2018-10-25 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to a shorter seq

Re: [PATCH][rs6000] better use of unaligned vsx in memset() expansion

2018-11-28 Thread Aaron Sawdey
align >= 128) - || (bytes >= 32 && TARGET_EFFICIENT_UNALIGNED_VSX))) + && (bytes >= 16 && ( align >= 128 || unaligned_vsx_ok))) { clear_bytes = 16; mode = V4SImode; On 11/26/18 4:29 PM, Segher Boessenkool wrote: > On Mon, Nov 26,

[PATCH 31/30] Update documentation for movmem to cpymem change

2019-06-26 Thread Aaron Sawdey
On 6/25/19 4:43 PM, Jeff Law wrote: > On 6/25/19 2:22 PM, acsaw...@linux.ibm.com wrote: >> From: Aaron Sawdey >> >> * builtins.c (get_memory_rtx): Fix comment. >> * optabs.def (movmem_optab): Change to cpymem_optab. >> * expr.c (emit_block_move_via

Re: [PATCH 32/30] Document movmem/cpymem changes in gcc-10/changes.html

2019-06-27 Thread Aaron Sawdey
On 6/25/19 4:43 PM, Jeff Law wrote: > On 6/25/19 2:22 PM, acsaw...@linux.ibm.com wrote: >> From: Aaron Sawdey >> >> * builtins.c (get_memory_rtx): Fix comment. >> * optabs.def (movmem_optab): Change to cpymem_optab. >> * expr.c (emit_block_move_via

[PATCH] Add movmem optab entry back in for overlapping moves

2019-07-02 Thread Aaron Sawdey
bootstrap/regtest on ppc64le and x86_64. Ok for trunk? 2019-07-02 Aaron Sawdey * optabs.def (movmem_optab): Add movmem back for memmove(). * doc/md.texi: Add description of movmem pattern for overlapping move. Index: gcc/doc/md.texi

Re: [PATCH] sched-ebb.c: avoid moving table jumps (PR rtl-optimization/88423)

2019-02-18 Thread Aaron Sawdey
/ppc32), ok for trunk? 2019-02-18 Aaron Sawdey PR rtl-optimization/88347 * schedule-ebb.c (begin_move_insn): Apply Segher's patch to handle a jump table before the barrier. On 1/24/19 9:43 AM, Alexander Monakov wrote: > On Wed, 23 Jan 2019, Alexander Monakov wrote:

Re: [PATCH] sched-ebb.c: avoid moving table jumps (PR rtl-optimization/88423)

2019-02-18 Thread Aaron Sawdey
On 2/18/19 10:41 AM, Alexander Monakov wrote: > On Mon, 18 Feb 2019, Aaron Sawdey wrote: > >> The code in emit_case_dispatch_table() will very clearly always emit >> branch/label/jumptable_data/barrier >> so this does need to be handled. So, yes tablejump always looks

Re: [PATCH][rs6000] avoid using unaligned vsx or lxvd2x/stxvd2x for memcpy/memmove inline expansion

2019-01-14 Thread Aaron Sawdey
The patch for this was committed to trunk as 267562 (see below). Is this also ok for backport to 8? Thanks, Aaron On 12/20/18 5:44 PM, Segher Boessenkool wrote: > On Thu, Dec 20, 2018 at 05:34:54PM -0600, Aaron Sawdey wrote: >> On 12/20/18 3:51 AM, Segher Boessenkool wrote: >&g

[PATCH, rs6000] PR target/89112 [8/9 Regression] fix bdnzt pattern for long branch case

2019-02-02 Thread Aaron Sawdey
backport to 8? Thanks! 2019-02-02 Aaron Sawdey * config/rs6000/rs6000.md (tf_): generate a local label for the long branch case. Index: gcc/config/rs6000/rs6000.md === --- gcc/config/rs6000/rs6000.md (revision 268403

[PATCH, rs6000] PR target/89112 put branch probabilities on branches generated by inline expansion

2019-02-04 Thread Aaron Sawdey
, which is what caused the long branches in 89112. With this patch, the test case for 89112 does not have any long branches within the expansion of memcmp, and the code for each memcmp is contiguous. OK for trunk and 8 backport if bootstrap/regtest passes? Thanks! Aaron 2019-02-04 Aaron Sawdey

Re: [PATCH, rs6000] PR target/89112 put branch probabilities on branches generated by inline expansion

2019-02-08 Thread Aaron Sawdey
Missed two more conditional branches created by inline expansion that should have had branch probability notes. 2019-02-08 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_compare_loop, expand_block_compare): Insert REG_BR_PROB notes in inline expansion of memcmp

[PATCH] PR rtl-optimization/88308 Update LABEL_NUSES in move_insn_for_shrink_wrap

2019-02-13 Thread Aaron Sawdey
e (32/64) and x86_64? Thanks! Aaron 2019-02-13 Aaron Sawdey * shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts on copied instruction. Index: gcc/shrink-wrap.c === --- gcc/shrink-wrap.c (revi

Re: [TESTSUITE]Use strncpy instead of strcpy in testsuite/gcc.dg/memcmp-1.c

2017-08-30 Thread Aaron Sawdey
aron > > Test Okay without any problem. Okay to commit? > > Regard, > Renlin > > > gcc/testsuite/ChangeLog: > > 2017-08-30  Renlin Li   > > * gcc.dg/memcmp-1.c (test_strncmp): Use strncpy instead of > strcpy. -- Aaron Sawdey, Ph.D. acsaw...@lin

Re: [PATCH] Add testcases to test builtin-expansion of memcmp and strncmp

2017-01-06 Thread Aaron Sawdey
Jeff, Thanks for the review. Committed as 244177 with requested changes. 2017-01-06 Aaron Sawdey * gcc.dg/memcmp-1.c: New. * gcc.dg/strncmp-1.c: New. Aaron

[PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-11 Thread Aaron Sawdey
strcmp-1.c test case to check strcmp expansion. Also both now have a length 100 tests to check the transition from the inline comparison to the library call for the remainder. ChangeLog 2017-01-11  Aaron Sawdey   * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg. * co

Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-16 Thread Aaron Sawdey
hanks, Aaron On Wed, 2017-01-11 at 11:26 -0600, Aaron Sawdey wrote: > This expands on the previous patch. For strcmp and for strncmp with N > larger than 64, the first 64 bytes of comparison is expanded inline > and > then a call to strcmp or strncmp is emitted to compare the remainder >

Re: [PATCH, bugfix] builtin expansion of strcmp for rs6000

2017-01-17 Thread Aaron Sawdey
On Tue, 2017-01-17 at 08:30 -0600, Peter Bergner wrote: > On 1/16/17 3:09 PM, Aaron Sawdey wrote: > > Here is an updated version of this patch. > > > > Tulio noted that glibc's strncmp test was failing. This turned out > > to > > be the use of signed HOST_WID

[PATCH] testcase for builtin expansion of strncmp and strcmp

2017-01-17 Thread Aaron Sawdey
27;ve included interested parties from targets that have a strncmp builtin. The test passes on x86_64 and on ppc64le with -mcpu=power6. It will not pass on ppc64/ppc64le -mcpu=power[78] until I check in my patch that segher ack'd yesterday and is currently regtesting. OK for trunk? -- Aaron Sa

[PATCH, pr63256] update powerpc dg options

2017-01-19 Thread Aaron Sawdey
SMS does process the loop in sms-8.c on powerpc now so I have updated the options to reflect that. Test now passes on powerpc -m64/-m32/-m32 -mpowerpc64. Ok for trunk? testsuite/ChangeLog 2017-01-19  Aaron Sawdey   * gcc.dg/sms-8.c: Update options for powerpc*-*-*. -- Aaron Sawdey, Ph.D

[PATCH][PR target/80083][7 regression] fix power9 vsx-small-integer issue caused by wrong constraints

2017-03-20 Thread Aaron Sawdey
xxspltib -1 that is also fixed now. Bootstrap/regtest reveals no errors on either power8 or power9. Ok for trunk? 2017-03-20  Aaron Sawdey   PR target/80083 * config/rs6000/rs6000.md (*movsi_internal1): incorrect constraints for alternatives 14/15.   -- Aaron Sawdey, Ph.D

Re: [PATCH][PR target/80083][7 regression] fix power9 vsx-small-integer issue caused by wrong constraints

2017-03-20 Thread Aaron Sawdey
On Mon, 2017-03-20 at 11:11 -0500, Aaron Sawdey wrote: > Test libgomp doacross2.f90 failed only at -O1 because an incorrect > constraint on movsi_internal1 (for vspltisw) led to confusion between > vsx and float registers (fix credit to Meissner). In subsequent > discussion David Edel

[PATCH][PR target/80123][7 regression] new constraint wA to prevent r0 use in mtvsrdd

2017-03-21 Thread Aaron Sawdey
strap/regtest on 64-bit LE and BE, and also BE 32- bit. OK for trunk if everything passes? 2017-03-21  Aaron Sawdey   PR target/80123 * doc/md.texi (Constraints): Document wA constraint. * config/rs6000/constraints.md (wA): New. * config/rs6000/rs6

[PATCH][PR target/80358][7 regression] Fix boundary check error in expand_block_compare

2017-04-07 Thread Aaron Sawdey
st in progress passes? 2017-04-07  Aaron Sawdey   PR target/80358 * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check. Index: gcc/config/rs6000/rs6000.c === --- gcc/config/rs6000/rs6000.c (revision 2

Re: [PATCH] Add -static-pie to GCC driver to create static PIE

2017-09-12 Thread Aaron Sawdey
uot; I don't see the problem on 252033. Thanks, Aaron -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

[PATCH][PR target/79170] fix memcmp builtin expansion sequence for rs6000 target.

2017-01-27 Thread Aaron Sawdey
ppc64/ppc64le. Assuming regtest on ppc64/ppc64le passes, ok for trunk? 2017-01-27  Aaron Sawdey   PR target/79170 * gcc.dg/memcmp-1.c: Improved to catch failures seen in PR 79170. 2017-01-27  Aaron Sawdey   PR target/79170 * config/rs6000/altivec.md (*setb_internal

Re: [PATCH, pr63256] update powerpc dg options

2017-02-01 Thread Aaron Sawdey
On Thu, 2017-01-19 at 17:00 -0600, Aaron Sawdey wrote: > SMS does process the loop in sms-8.c on powerpc now so I have updated > the options to reflect that. > > Test now passes on powerpc -m64/-m32/-m32 -mpowerpc64. Ok for trunk? > > testsuite/ChangeLog > 201

[PATCH][PR target/79449][7 regression] fix ppc strncmp builtin expansion runtime boundary crossing check

2017-02-09 Thread Aaron Sawdey
d the new test case passes on x86_64 as well, ok for trunk? 2017-02-09  Aaron Sawdey   PR target/79449 * gcc.dg/strncmp-2.c: New. Test strncmp and memcmp builtin expansion for reading beyond a 4k boundary. 2017-02-09  Aaron Sawdey   PR target/79449 * c

[PATCH][PR target/79295][7 regression] fix ppc bcdadd insn pattern

2017-02-09 Thread Aaron Sawdey
The bcdadd pattern has the wrong constraints. The change Meissner supplied in PR79295 fixes the issue. Successfully bootstrapped on ppc64le, ok for trunk if regtest also passes? 2017-02-09  Aaron Sawdey   PR target/79295 * config/rs6000/altivec.md (bcd): Fix constraints

[PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread Aaron Sawdey
This testcase I added failed to compile on AIX or older linux due to the use of aligned_alloc(). Now fixed to use posix_memalign if available, and valloc otherwise. Now it compiles and passes on x86_64 (fedora 25), ppc64 (RHEL6.8), and AIX. OK for trunk? 2017-02-14  Aaron Sawdey

Re: [PATCH] portability fix for gcc.dg/strncmp-2.c testcase

2017-02-14 Thread Aaron Sawdey
On Tue, 2017-02-14 at 13:09 -0600, Segher Boessenkool wrote: > On Tue, Feb 14, 2017 at 11:56:50AM -0600, Aaron Sawdey wrote: > > This testcase I added failed to compile on AIX or older linux due > > to > > the use of aligned_alloc(). Now fixed to use posix_memalign if >

Re: [PATCH, testsuite]: Use posix_memalign instead of aligned_alloc in gcc.dg/strncmp-2.c

2017-02-20 Thread Aaron Sawdey
4-linux-gnu, CentOS 5.11. > > OK for mainline? Uros, I posted something very similar last Tuesday: https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00937.html I didn't get around to applying it until this morning in 245608. Apologies for wasting your time tracking down the same issue agai

[PATCH][PR target/79752] fix rs6000 power9 peephole2 for udiv/umod

2017-02-28 Thread Aaron Sawdey
(div:GPR (match_dup 1) +   (udiv:GPR (match_dup 1)  (match_dup 2))) (set (match_dup 3) (mult:GPR (match_dup 0) 2017-02-28  Aaron Sawdey   PR target/79752 * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit udiv rather than div since inpu

[PATCH][PR target/79752] fix rs6000 power9 peephole2 for udiv/umod -- backported to gcc-6-branch

2017-03-14 Thread Aaron Sawdey
 (match_dup 2))) +   (udiv:GPR (match_dup 1) + (match_dup 2))) (set (match_dup 3) (mult:GPR (match_dup 0)   (match_dup 2))) 2017-03-14  Aaron Sawdey   Backport from mainline 2017-02-28  Aaron Sawdey   PR target/79752 * co

[PATCH] builtin expansion of memcmp for powerpc

2016-09-22 Thread Aaron Sawdey
40 bytes. Bootstrap on powerpc64le, regtest in progress, OK for trunk if no new regressions? 2016-09-22  Aaron Sawdey   * config/rs6000/rs6000.md (cmpmemsi): New define_expand. * config/rs6000/rs6000.c (expand_block_compare): New function used by cmpmemsi pattern to do

Re: [PATCH] builtin expansion of memcmp for powerpc

2016-09-24 Thread Aaron Sawdey
PPC64 Linux.  This patch > should be using !BYTES_BIG_ENDIAN. Change made, I will commit as obvious once I bootstrap to double check my work on ppc64le. Sorry for the mess ...   Aaron -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Te

[PATCH PR77718]

2016-09-28 Thread Aaron Sawdey
* If SRC is a string constant and block move would be done   by pieces, we can avoid loading the string from memory -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

[PATCH, RS6000] improve builtin expansion of memcmp for p7

2016-10-06 Thread Aaron Sawdey
er than p8. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC ToolchainIndex: gcc/config/rs6000/rs6000.c === --- gcc/config/rs6000/rs6000.c (revision 24081

[PATCH, RS6000, Committed] increase buf size in rs6000_elf_asm_out_{constructor,destructor}

2016-10-06 Thread Aaron Sawdey
It seems we now have analysis that concludes these buffers may possibly overflow. This broke bootstrap on ppc64 BE. Bootstrap passed on ppc64 BE power7. Committing as pre-approved by Segher. 2016-10-06 Aaron Sawdey * config/rs6000/rs6000.c (rs6000_elf_asm_out_constructor

[PATCH, RS6000, PR77934] mtvsrdd needs b (base register) constraint on first input

2016-10-11 Thread Aaron Sawdey
Gcc 7 trunk was generating incorrect code for spec2k6 403.gcc due to this constraint issue. OK for trunk after bootstrap/regtest passes? 2016-10-06  Aaron Sawdey   PR target/77934 * config/rs6000/vmx.md (vsx_concat_): The mtvsrdd instruction needs a base register for arg

Re: PING! Re: [PATCH, Fortran] Extension: COTAN and degree-valued trig intrinsics with -fdec-math

2016-10-11 Thread Aaron Sawdey
rtran/iresolve.c:2728:14: error: âtmpâ was not declared in this scope and also this: ../../gcc/gcc/fortran/simplify.c: In function âvoid radians_f(__mpfr_struct*, mpfr_rnd_t)â: ../../gcc/gcc/fortran/simplify.c:1775:5: error: âmpfr_fmod_dâ was not declared in this scope mpfr_fmod_d (tmp, x, 360.0, rnd_mode); ^~~ -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC Toolchain

[RFC PATCH] expand_strn_compare should attempt expansion even if neither string is constant

2016-10-26 Thread Aaron Sawdey
If so I'll bootstrap/regtest on i386 as rs6000 does not as yet have an expansion for cmpstrsi or cmpstrnsi. Thanks,    Aaron -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Center - PPC ToolchainIn

  1   2   >