Re: [PATCH, rs6000] (v2) GIMPLE folding for vector compares

2017-11-15 Thread Segher Boessenkool
arguments for 128-bit pack instructions. */ > case MISC_BUILTIN_PACK_TD: Here too, but that is existing code :-) Okay for trunk with those trivialities cleaned up. Thanks! Segher

Re: [PATCH, rs6000] Repair vec_xl, vec_xst, vec_xl_be, vec_xst_be built-in functions

2017-11-15 Thread Segher Boessenkool
(const_int 8) > + (const_int 7) (const_int 6) > + (const_int 5) (const_int 4) > + (const_int 3) (const_int 2) > + (const_int 1) (const_int 0)])))] Here, too. The rest looks fine. Thanks! Segher

Re: [PATCH, rs6000] Correct some Power9 scheduling info

2017-11-16 Thread Segher Boessenkool
Hi Pat, That look good, thanks! Okay for trunk. Segher

Re: [PATCH] Fix PowerPC testsuite not to look for *.c*~ files

2017-11-16 Thread Segher Boessenkool
, not *.c* > files to prevent ~ files from getting recognized. > * gcc.target/powerpc/dfp/dfp.exp: Likewise. > * gcc.target/powerpc/vsu/vsu.exp: Likewise. And these are the only three testsuites with this problem (in powerpc/), and we do not have any *.c* files other than *.c . Okay for trunk, thanks! Segher

Re: [PATCH, rs6000] correct implementation of _mm_add_pi32

2017-11-16 Thread Segher Boessenkool
Hi! On Wed, Nov 15, 2017 at 08:58:21PM -0600, Steven Munroe wrote: > A small thinko in the implementation of _mm_add_pi32 that only shows > when compiling for power9. This is okay, it is trivial and obvious. Please commit. Thanks, Segher > 2017-11-15 Steven Munroe > >

Re: [PATCH #2], make Float128 built-in functions work with -mabi=ieeelongdouble

2017-11-16 Thread Segher Boessenkool
ase. The whole assert is pretty useless fwiw; just take it out? > + for (i = 0; i < ARRAY_SIZE (map); i++) > + map_insn_code[(int)map[i].from] = map[i].to; > + } Space after cast. Only do this for codes that are *not* CODE_FOR_nothing? Segher

Re: [PATCH #2], make Float128 built-in functions work with -mabi=ieeelongdouble

2017-11-16 Thread Segher Boessenkool
On Thu, Nov 16, 2017 at 12:54:54PM -0500, David Edelsohn wrote: > On Thu, Nov 16, 2017 at 12:48 PM, Michael Meissner > wrote: > > On Thu, Nov 16, 2017 at 04:48:18AM -0600, Segher Boessenkool wrote: > >> On Wed, Nov 15, 2017 at 04:56:10PM -0500, Michael Meissner wrote: >

Re: [PATCH] Add _Float/_FloatX rounding built-ins & improve gimple optimization of _Float/_FloatX built-in functions

2017-11-17 Thread Segher Boessenkool
; + UNSPEC_FRIZ))] > + "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" > + "xsrqpi 1,%0,%1,0" > + [(set_attr "type" "vecfloat") > + (set_attr "size" "128")]) Is this one correct? Truncate is RMC=1, not RMC=0, I think? The rest of the rs6000 part looks fine. Thanks! Segher

[PATCH] rs6000: Fix for altivec-macros.c

2017-11-17 Thread Segher Boessenkool
This fixes the altivec-macros.c testcase; we now need to explicitly say "no column number" for messages without one. Tested on powerpc64-linux {-m32,-m64}; committing to trunk. Segher 2017-11-17 Segher Boessenkool gcc/testsuite/ * gcc.target/powerpc/altivec-macros.

[PATCH] combine: Don't split insns if half is unused (PR82621)

2017-11-17 Thread Segher Boessenkool
7;t do that in an I3). Tested on powerpc64-linux {-m32,-m64}, committing to trunk, and I'll do backports next week. Segher 2017-11-17 Segher Boessenkool PR rtl-optimization/82621 * combine.c (try_combine): Do not split PARALLELs of two SETs if the dest of on

Re: [PATCH, rs6000] Testcase updates for power9 codegen

2017-11-20 Thread Segher Boessenkool
't be tested with any other settings. (Also, does that work if the user puts another -mcpu= in RUNTESTFLAGS). I'm all for making the testresults cleaner, but let's not do that by (effectively) disabling all failing tests ;-) (Please split this up a bit when you repost it btw). Segher

Re: [PATCH] Add _Float/_FloatX rounding built-ins & improve gimple optimization of _Float/_FloatX built-in functions

2017-11-20 Thread Segher Boessenkool
dg-options "-mvsx -O2" } */ This last line should not be there. Thanks, Segher

Re: [PATCH] rs6000: Don't touch below the stack pointer (PR77687)

2017-11-20 Thread Segher Boessenkool
On Tue, Sep 19, 2017 at 09:21:50PM +, Segher Boessenkool wrote: > With the 32-bit SVR4 ABI we don't have a red zone, so we have to restore > the callee-saved registers before we restore the stack pointer. > > The previous fix for this PR failed in two ways, for huge frames:

Re: [PATCH] rs6000_gimple_fold_builtin formatting fixes

2017-11-23 Thread Segher Boessenkool
p of > the function, so that {}s don't need to clutter most of the cases. > The patch shouldn't change the generated code at all. > > Ok for trunk if it passes bootstrap/regtest? Okay, thanks! Segher

Re: [PATCH, rs6000] Testcase updates for power9 codegen

2017-11-23 Thread Segher Boessenkool
thats really not my intent here. I'm not really convinced thats > what I've done here either. I've added .p9 versions for most of what > I've touched, with the intent to continue to have good coverage. I missed that :-) Great, thanks. > Adding the -mcpu=foo option to dg-options shouldn't be disabling the > test..? It means this test won't test codegen for any later cpu. So if there is no separate test for later cpus, you lose test coverage. Thanks, Segher

Re: [PATCH, rs6000] (v2) fold-vec-splat* testcase updates for power9

2017-11-23 Thread Segher Boessenkool
sb to expected output. > * fold-vec-splats-int.c : Add mtvsrws to expected output. > * fold-vec-splats-longlong.c : Add mtvsrdd to expected output. No space before the colon. Okay for trunk with that fixed. Thanks, Segher

Re: [PATCH, rs6000] (v2) fold-vec-ld* testcase updates for power9

2017-11-23 Thread Segher Boessenkool
xpected output. > * fold-vec-ld-short.c: Add lxv insn to expected output. You have the pathnames wrong? Should include gcc.target/powerpc/ . Okay otherwise. Thanks, Segher

Re: [PATCH, rs6000] (v2) testcase updates for fold-vec-abs-* for power9 codegen

2017-11-23 Thread Segher Boessenkool
> * fold-vec-abs-char-fwrapv.c: Add xxspltib insn to expected output. > * fold-vec-abs-char.c: Add xxspltib insn to expected output list. Paths... Otherwise, okay for trunk. Thanks! Segher

Re: [PATCH] Fix powerpc* ICE with vec builtins with -mno-altivec (PR target/82848)

2017-11-24 Thread Segher Boessenkool
Usually people are using the altivec.h etc. headers that error > if the ISA is not enabled, so this will only affect people that use the > builtins directly. Yeah I agree. Okay for trunk, thanks! Segher > 2017-11-23 Jakub Jelinek > > PR target/82848 > * c

Re: [PATCH] Fix combine's simplify_if_then_else (PR rtl-optimization/81553)

2017-11-24 Thread Segher Boessenkool
better than bailing out though, do you have an example? Segher > 2017-11-24 Jakub Jelinek > > PR rtl-optimization/81553 > * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z) > to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization

Re: [PATCH] Fix combine's simplify_if_then_else (PR rtl-optimization/81553)

2017-11-25 Thread Segher Boessenkool
split, and try that. That should usually split the mul off, and you usually will have started with a mul in a separate insn, so says this was i1+i2+i3 with i3 the mul, in effect this is then just combining i1+i2. Sometimes of course that will then work, where combining just i1+i2 won't (because of known register values, or REG_DEAD notes, or similar). Segher

[PATCH] rs6000: Improve scc isel

2017-11-27 Thread Segher Boessenkool
{-m32,-m64} (--with-cpu=power7 and forcing -misel on). Committing to trunk. Segher 2017-11-28 Segher Boessenkool * config/rs6000/rs6000.md (2_isel): Change LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible. --- gcc/config/rs6000/rs6000.md | 36

[PATCH] rs6000: Improve comparison rtx_cost (PR81288)

2017-11-27 Thread Segher Boessenkool
igh cost, also simplifying this code. Tested on powerpc64-linux {-m32,-m64}; committing to trunk. I'll backport this later this week. Segher 2017-11-27 Segher Boessenkool PR 81288/target * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle TARGET_ISEL &am

[PATCH] rs6000: Add second variant of adde

2017-11-29 Thread Segher Boessenkool
patch. Segher 2017-11-28 Segher Boessenkool * config/rs6000/rs6000.md (*add3_carry_in_internal2): New. --- gcc/config/rs6000/rs6000.md | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 20b1581..7e91d54 1

[PATCH] combine: Do not throw away unneeded arms of parallels (PR83156)

2017-11-29 Thread Segher Boessenkool
}; committing to trunk. Segher 2017-11-29 Segher Boessenkool PR rtl-optimization/83156 PR rtl-optimization/82621 * combine.c (try_combine): Don't split an I2 if one of the dests is set again before I3. Allow unused dests. --- gcc/combine.c | 3 ++- 1 file chang

[PATCH] combine: Print to dump if some insn cannot be combined into i3

2017-11-29 Thread Segher Boessenkool
Eventually we should print the reason that any combination fails. This is a good start (these happen often). Applying to trunk. Segher 2017-11-29 Segher Boessenkool * combine.c (try_combine): Print a message to dump file whenever I0, I1, or I2 cannot be combined into I3

[PATCH] final: Improve output for -dp and -fverbose-asm

2017-11-29 Thread Segher Boessenkool
ose at 0, too). And finally, it tries to keep things lined up in columns a bit better. Tested on powerpc64-linux {-m32,-m64}; is this okay for trunk? Segher 2017-11-29 Segher Boessenkool * final.c (output_asm_name): Print insn_cost. Shorten output. Print which_al

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-11-29 Thread Segher Boessenkool
do echo "$$x"; done; > > clean-float128: > - rm -rf $(fp128_softfp_src) > + rm -rf $(fp128_softfp_src) $(fp128_hardfp_src) > @$(MULTICLEAN) multi-clean DO=clean-float128 -rm to avoid warnings from rm if you clean without the files being there. Otherwise looks good. Thanks! Segher

[PATCH,RFC] combine: Remove use_crosses_set_p

2017-11-30 Thread Segher Boessenkool
erhaps use dataflow everywhere. Comments/ideas welcome, both on this patch and that longer-term plan. Segher 2017-11-30 Segher Boessenkool * combine.c: Adjust comment. (use_crosses_set_p): Delete. (can_combine_p): Use modified_between_p instead of use_cro

Re: [PATCH] final: Improve output for -dp and -fverbose-asm

2017-11-30 Thread Segher Boessenkool
On Wed, Nov 29, 2017 at 08:46:41PM -0700, Martin Sebor wrote: > On 11/29/2017 04:13 PM, Segher Boessenkool wrote: > >This improves the assembler output (for -dp and -fverbose-asm) in > >several ways. It always prints the insn_cost. It does not print > >"[length = NN]&q

[PATCH] rs6000: Improve fusion assembler output

2017-11-30 Thread Segher Boessenkool
x27;t interfere with other debug comments. Mike, does this look good? Or is there something I'm missing :-) Tested on powerpc64-linux {-m32,-m64}. Segher 2017-11-30 Segher Boessenkool * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two parameters from

[PATCH] rs6000: Set rs6000_cpu correctly (PR43871)

2017-11-30 Thread Segher Boessenkool
We set rs6000_cpu based on tune_index, but it should be cpu_index. This patch fixes it. Tested on powerpc64-linux {-m32,-m64}. I'll commit this later today, and schedule backports for next week. Unless it is all terribly wrong and someone complains :-) Segher 2017-11-30 Segher Boesse

Re: [PATCH] final: Improve output for -dp and -fverbose-asm

2017-11-30 Thread Segher Boessenkool
# 81 [c=4 l=4] jump === It is neither line length nor amt of info that makes the second one way better readable. Segher

Re: [PATCH] final: Improve output for -dp and -fverbose-asm

2017-11-30 Thread Segher Boessenkool
# MEM[(unsigned int *)0B], _13 trap .L7: # 81288.c:8: f3 = !!t4; addic 4,9,-1 # tmp139, tmp133 subfe 4,4,9 # , tmp139, tmp133 b .L5# === If we're okay with outputting that kind of stuff to *users*, then how bad is [c=8 l=4] for GCC developers? Heh. Segher

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

2017-12-01 Thread Segher Boessenkool
ccin)); > + if (gpc_reg_operand (operands[0], mode)) > + emit_insn (gen_add3 (ctrout, ctr, constm1_rtx)); > + else > + { > + emit_insn (gen_add3 (ctrtmp, ctr, constm1_rtx)); That has a tab after spaces, never correct. > + emit_move_insn (ctrout, ctrtmp); > + } > + rtx cmp = gen_rtx_EQ (CCEQmode, operands[9], const0_rtx); > + emit_jump_insn (gen_rtx_SET (pc_rtx, > +gen_rtx_IF_THEN_ELSE (VOIDmode, cmp, > + dst1, dst2))); > + DONE; > }) Looks good otherwise. I'll ok it when there is a user (or a testcase). It shouldn't go in before the canonicalize_condition patch, of course. Thanks! Segher

Re: [PATCH] final: Improve output for -dp and -fverbose-asm

2017-12-01 Thread Segher Boessenkool
7;s important (I don't > think it is in this case). It is documented with -dp (I'll document it prints insn cost too). Segher

Re: [PATCH] rs6000: Improve fusion assembler output

2017-12-01 Thread Segher Boessenkool
On Thu, Nov 30, 2017 at 12:54:53PM -0500, Michael Meissner wrote: > On Thu, Nov 30, 2017 at 11:59:37AM +0000, Segher Boessenkool wrote: > > This improves the output for load and store fusion a little. In most > > cases it removes the comment output, because that makes the generate

Re: [PATCH #2], PR target/81959, Fix ++int to _Float128 conversion on power9

2017-12-01 Thread Segher Boessenkool
mode if there is arithmetic support for KFmode to copy things, and > TImode isn't supported in 32-bit. That's what lp64 is for. > The __float128 support is not built if the compiler is a 32-bit compiler (the > enabler for _float128 is in linux64.h) So we need some bugzilla predicate for that really? Okay for trunk. Further improvements welcome ;-) Thanks! Segher

Re: [PATCH] final: Improve output for -dp and -fverbose-asm

2017-12-01 Thread Segher Boessenkool
nvenient place to quickly get an overview of what we generate. Segher

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-01 Thread Segher Boessenkool
ations? Should this declaration be in a header then? A code comment explaining why you do a declaration for exactly the same thing as there is two lines later would help; otherwise people will try to delete it again :-) Segher

[PATCH] doc update for -dp

2017-12-01 Thread Segher Boessenkool
Committing as obvious and trivial. Segher 2017-12-01 Segher Boessenkool * doc/invoke.texi (-dp): Say that instruction cost is printed as well. --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi

[PATCH] lra: Clobbers in a parallel are earlyclobbers (PR83245)

2017-12-02 Thread Segher Boessenkool
cross. Andreas, can you confirm this really still works after this patch? Vlad, if so, is this okay for trunk? Segher 2017-12-02 Segher Boessenkool * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand hard registers as earlyclobber, also if not in an asm

Re: [PATCH] rs6000: Set rs6000_cpu correctly (PR43871)

2017-12-02 Thread Segher Boessenkool
was too good to be true, a simple two-liner would solve this, heh. I think I know what to do (needs testing, will be tomorrow at earliest); but deeper investigation shows we use rs6000_cpu in quite a few places where we mean rs6000_tune (which doesn't exist). I don't know how deep this pit is. Feel free to revert my patch (if it takes too long to fix this, I'll revert it myself). Sorry :-/ Segher

Re: [PATCH,RFC] combine: Remove use_crosses_set_p

2017-12-04 Thread Segher Boessenkool
On Thu, Nov 30, 2017 at 09:26:37AM +, Segher Boessenkool wrote: > This removes use_crosses_set_p, and uses modified_between_p instead > everywhere it was used. This improves optimisation. I'm a little bit > worried it might increase compile time; so far I haven't seen

[PATCH 2/3] rs6000: Don't use rs6000_cpu_attr directly

2017-12-06 Thread Segher Boessenkool
In some places in the code we currently use rs6000_cpu_attr, although that is a cast from rs6000_tune. This patch changes things to be more regular and clearer. Now rs6000_cpu_attr is only used to define the Segher 2017-12-06 Segher Boessenkool * config/rs6000/rs6000.h

[PATCH 1/3] rs6000: Split rs6000_cpu

2017-12-06 Thread Segher Boessenkool
to rs6000_tune in the appropriate cases (i.e. most, but not those that enable using new insns). All three patches bootstrapped and tested on powerpc64-linux {-m32,-m64}, and on powerpc64le-linux. David, do those look okay? Segher 2017-12-06 Segher Boessenkool * config/rs6000/rs6000

[PATCH 3/3] rs6000: Initialise rs6000_cpu correctly (PR43871)

2017-12-06 Thread Segher Boessenkool
Finally, set rs6000_cpu based not on -mtune=, but only -mcpu= and the defaults. Segher 2017-12-06 Segher Boessenkool PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu to the give -mcpu=, or to the default processor. --- gcc

Re: [PATCH 2/3] rs6000: Don't use rs6000_cpu_attr directly

2017-12-06 Thread Segher Boessenkool
On Wed, Dec 06, 2017 at 11:42:13AM +, Segher Boessenkool wrote: > In some places in the code we currently use rs6000_cpu_attr, although > that is a cast from rs6000_tune. This patch changes things to be more > regular and clearer. Now rs6000_cpu_attr is only used to define the Th

Re: Backports to gcc 7.x

2017-12-07 Thread Segher Boessenkool
tstrapped and regression tested on the > GCC 7 branch. > > Is this ok for backporting to GCC 7? Yes please. Thanks! Segher

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Segher Boessenkool
TREE_INT_CST_LOW (arg0)); > + vec *ctor_elts = NULL; > + unsigned int n_elts = TYPE_VECTOR_SUBPARTS (TREE_TYPE (lhs)); > + for (unsigned int i=0; i < n_elts ; i++) +for (unsigned int i = 0; i < n_elts; i++) Well that's all ;-) Segher

[PATCH] combine: Fix PR83304

2017-12-08 Thread Segher Boessenkool
c64-linux {-m32,-m64}. Committing to trunk. Segher 2017-12-08 Segher Boessenkool PR rtl-optimization/83304 * combine.c (move_deaths): If we do not know where a register died, search for it. --- gcc/combine.c | 20 1 file changed, 20 insertions(

Re: [PATCH, rs6000] Add missing builtin functionality and tests

2017-12-08 Thread Segher Boessenkool
_vmulosbvmulesb > +/* { dg-final { scan-assembler-times "vmulesb" 0 } } */ Those don't agree. Also test for vmulosb? (Also in the LE test). Did you test this targeting older CPUs? If not, expect fallout. The patch is okay for trunk (with the trivial fixes). Thanks! Segher

Re: [PATCH, rs6000] Add additional builtin tests

2017-12-08 Thread Segher Boessenkool
Hi! > +// *** TODO: add checs for the adds tests Did you forget this part? Also the same trivial things as the previous patch. The rest looks fine, okay for trunk. Thanks! Segher

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-12-08 Thread Segher Boessenkool
attempt to place notes in i2, to get the bugs fixed while > we sort out the really tricky issues of adjusting REG_N_SETS. The > (incomplete, but functional) fix has been known for a while, and we > shouldn't subject users to wrong code when we can help it, even if we > might miss optimization opportunities for that, right? Thoughts? Yes, that first patch is okay for trunk. Thanks for all the work on this! I don't think this patch makes anything worse, and it does make some things better. Segher

wwwdocs: Power ISA documentation

2017-12-08 Thread Segher Boessenkool
Hi! The Power ISA documentation is now available without registration. I have committed the wwwdocs patch below. Enjoy, Segher Index: htdocs/readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving

[PATCH] ifcvt: Call fixup_partitions (PR83361)

2017-12-11 Thread Segher Boessenkool
{-m32,-m64}; okay for trunk if it succeeds? Segher 2017-12-11 Segher Boessenkool PR rtl-optimization/83361 * ifcvt.c (if_convert): Call fixup_partitions. gcc/testsuite/ PR rtl-optimization/83361 * gcc.dg/pr83361.c: New testcase. --- gcc/ifcvt.c

Re: [PATCH #2], PR target/81959, Fix ++int to _Float128 conversion on power9

2017-12-11 Thread Segher Boessenkool
On Mon, Dec 04, 2017 at 04:31:55PM -0500, Michael Meissner wrote: > On Fri, Dec 01, 2017 at 05:33:39PM -0600, Segher Boessenkool wrote: > > Okay for trunk. Further improvements welcome ;-) Thanks! > > Here is the patch for GCC 7 (the bug shows up in GCC 7). It is slightly >

Re: [PATCH, rs6000] (v2) Gimple folding of splat_uX

2017-12-11 Thread Segher Boessenkool
= gimple_call_arg (stmt, 0); The indent here is wrong (should be two spaces, is three). Looks fine otherwise. Okay for trunk with that fixed. Thanks! Segher

[PATCH] Fix the new pr83361.c testcase

2017-12-11 Thread Segher Boessenkool
It needs the following. Sorry for that. Committing. Segher 2017-12-11 Segher Boessenkool gcc/testsuite/ * gcc.dg/pr83361.c: Add -Wno-div-by-zero to dg-options. --- gcc/testsuite/gcc.dg/pr83361.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite

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

2017-12-12 Thread Segher Boessenkool
} You don't need {} here. > + if ( need_library_call ) No spaces inside (). > + if (!bytes_is_const || bytes >= loop_bytes) > +{ > + /* It should not be possible to come here if remaining bytes is > + < 16. Compute number of loop iterations. We compare Please do an assert then, if something should not be possible. > + JUMP_LABEL(j) = library_call_label; Space before (, also in macro invocations (but not in macro definitions obviously). Please fix those trivialities, and it's okay for trunk (after the rtlanal patch is approved too). Thanks! Segher

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-12 Thread Segher Boessenkool
A code comment explaining why you do a declaration for exactly the same > > thing as there is two lines later would help; otherwise people will try > > to delete it again :-) Segher

Re: [PATCH, rs6000] Fix PR83332 (missing vcond patterns)

2017-12-12 Thread Segher Boessenkool
t; > + " > +{ > + if (rs6000_emit_vector_cond_expr (operands[0], operands[1], operands[2], > + operands[3], operands[4], operands[5])) > +DONE; > + else > +FAIL; > +}") And no "" around the block. Okay for trunk with that fixed up. Thanks! Segher

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

2017-12-12 Thread Segher Boessenkool
> > That should be capitalized: Fix instead of fix > > [wrong patch deleted] > Yes that is a different patch unrelated to the 82190 fix. I've > attached the correct patch. That looks better :-) Okay for trunk, thanks! Segher

[PATCH] combine: Fix PR83393

2017-12-13 Thread Segher Boessenkool
implements that. Tested on powerpc64-linux {-m32,-m64}; test is running on x64_64-linux {-m32,-m64} (the new testcase tested fine already). I'll commit it in a bit if that test succeeds. Segher 2017-12-13 Segher Boessenkool PR rtl-optimization/83393 * combine.c (move_deaths

Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c

2017-12-13 Thread Segher Boessenkool
On Tue, Dec 12, 2017 at 04:56:36PM -0500, Michael Meissner wrote: > On Tue, Dec 12, 2017 at 11:04:55AM -0600, Segher Boessenkool wrote: > > On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote: > > > > > +extern KCtype __divkc3 (KFtype

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

2017-12-13 Thread Segher Boessenkool
t line is too long.) Okay for trunk, thanks! We'll probably want some macro for this isP8||isP9 condition, but this is fine for now. Let's not do many more of this though. Segher

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-15 Thread Segher Boessenkool
gt; happening. So while we can fix canonicalize_condition to reject this > form (and you can argue we should and I'd generally agree with you), it > could well be papering over a problem earlier. canonicalize_condition does not do what its documentation says it does. Fixing that is not papering over a problem. Of course there could be a problem elsewhere, sure. But *this* problem is blocking Aaron's other patches right now (which are approved and ready to go in). Segher

[PATCH] rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)

2017-12-16 Thread Segher Boessenkool
In PR83424 combine's move_deaths puts a REG_DEAD not in the wrong place because dead_or_set_regno_p does not account for CLOBBER insns. This fixes it. Bootstrapped and tested on powerpc64-linux {-m32,-m64} and on x86_64-linux. Is this okay for trunk? Segher 2017-12-16 Segher Boesse

Re: [Patch combine] Don't create vector mode ZERO_EXTEND from subregs

2017-12-16 Thread Segher Boessenkool
ant a vector > zero_extend of a scalar value. > > We need to explicitly reject vector modes from this transformation. It does not consider any other modes either. Both modes involved are required to be SCALAR_INT_MODE_P (for zero_extend to be valid at all and to be equivalent to the subreg); could you test for that instead please? Segher

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Segher Boessenkool
Hi Jeff, On Tue, Dec 19, 2017 at 04:40:23PM -0700, Jeff Law wrote: > On 12/15/2017 02:16 AM, Segher Boessenkool wrote: > >> The only way to get into check_simple_exit is via find_simple_exit which > >> is only called from get_simple_loop_desc. > >> > >> And

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Segher Boessenkool
t; introduce that oddball behavior. It is a simple loop, just with a slightly more complex exit condition. What is "simple"? Heh. Segher

Re: [PATCH] Add _Float/_FloatX rounding built-ins & improve gimple optimization of _Float/_FloatX built-in functions

2017-12-21 Thread Segher Boessenkool
,%0,%1,0 for > round-to-nearest-away semantics which are what the round2 > instruction has (i.e., what you've written here is actually correct for > nearbyint2, and would be rint2 if xsrqpix were used instead). Ah yes, the roundM2 insn is round-away-from-zero, so you are right. Tricky, from the name I assumed it would be "current rounding mode" :-/ Not that "frin" would make sense if that were true. Thanks! And thanks for all the reviews in general. Segher

Re: [PATCH] Change PRED_LOOP_EXIT from 85 to 92

2017-12-23 Thread Segher Boessenkool
rk that runs out of L1 cache. Why is this single benchmark more important than everything else? https://patchwork.ozlabs.org/patch/637073/ Segher

Re: [PATCH] Change PRED_LOOP_EXIT from 85 to 92

2017-12-24 Thread Segher Boessenkool
On Sun, Dec 24, 2017 at 09:12:56AM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Fri, Dec 22, 2017 at 04:53:47PM -0600, David Esparza wrote: > >> With a value of 85 GCC has a CPU performance degradation of 11%, > >> reverting PRED_LOOP_EXIT to 92

Re: [PATCH PR82439][simplify-rtx] Simplify (x | y) == x -> (y & ~x) == 0

2018-01-03 Thread Segher Boessenkool
and added new test > cases. > Is this ok for trunk? You forgot to include the patch :-) Segher

Re: [PATCH] [PR testsuite/81010] Fix PPC test

2018-01-07 Thread Segher Boessenkool
; ia[i] = (int) sb[i]; > } > > -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\(subreg:SI > \\\(reg:DI" 1 "loop2_doloop" } } */ > +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\(zero_extend:DI > \\\(reg:SI" 1 "combine" } } */ Yay, toothpickeritus ;-) But none of that is new, so okay with or without those extra cleanups. Thanks! Segher

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-07 Thread Segher Boessenkool
e actual generated machine code (and there are labels between the insns, for example)? Segher

Re: [PATCH] [PR testsuite/81010] Fix PPC test

2018-01-07 Thread Segher Boessenkool
Hi, On Sun, Jan 07, 2018 at 11:09:33AM -0600, Segher Boessenkool wrote: > > > /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { > > "-mcpu=power7" } } */ > > And you could delete this line, since nothing in the testca

Re: [PATCH, libgcc] Fix PowerPC libgcc issues with -mabi=ieeelongdouble

2018-01-08 Thread Segher Boessenkool
> > I have also done a bootstrap build with my preliminary multilib patches, and > it > built fine with both -mabi=ieeelongdouble and -mabi=ibmlongdouble > configurations. > > Can I apply these patches to libgcc? As far as I can follow, it's okay for t

Re: [PATCH, rs6000] Add vec_mergee, vec_mergeo, vec_float2 builtin support

2018-01-08 Thread Segher Boessenkool
1 "vsx_register_operand" "")) > + (use (match_operand:VSX_D 2 "vsx_register_operand" ""))] Drop the empty default field please (here and elsewhere, certainly in all expanders). It looks good to me otherwise. Okay for trunk. Thanks! Segher

Re: [PATCH, rs6000] Fix PR83677 (incorrect generation of xxpermr)

2018-01-08 Thread Segher Boessenkool
estsuite/gcc.target/powerpc/pr83677.c(working copy) > @@ -0,0 +1,166 @@ > +/* { dg-do run { target { powerpc64*-*-* && { lp64 && p9vector_hw } } } } */ powerpc*-*-* please; or why would that not work? Segher

Re: [PATCH], Add optional IEEE/IBM long double multilib support

2018-01-08 Thread Segher Boessenkool
then? There already is an option to turn off multilibs, for people who really really want that. Segher

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-08 Thread Segher Boessenkool
On Mon, Jan 08, 2018 at 01:27:24PM +, Wilco Dijkstra wrote: > Segher Boessenkool wrote: > > On Fri, Jan 05, 2018 at 12:22:44PM +, Wilco Dijkstra wrote: > >> An example epilog in a shrinkwrapped function before: > >> > >> ldp    x21, x22, [sp,#16] >

Re: [PATCH][AArch64] Use LDP/STP in shrinkwrapping

2018-01-08 Thread Segher Boessenkool
es of the same restores might be emitted. N could be the number > of blocks in a function - I really hope it doesn't work out like that... In the worst case it would. OTOH, joining every combo into blocks costs O(2**C) (where C is the # components) bb's worst case. It isn't a simple problem. The current tuning works pretty well for us, but no doubt it can be improved! Segher

Re: [PATCH] testsuite: Introduce be/le selectors

2018-05-25 Thread Segher Boessenkool
On Fri, May 25, 2018 at 10:30:58AM +0100, Richard Earnshaw (lists) wrote: > On 24/05/18 18:28, Segher Boessenkool wrote: > > On Wed, May 23, 2018 at 10:07:18AM +0100, Richard Earnshaw (lists) wrote: > >> On 22/05/18 22:21, Jeff Law wrote: > >>> On 05/21/2018 03:4

Re: [PATCH, rs6000] Remove incorrect built-in function documentation

2018-05-28 Thread Segher Boessenkool
d vec_stvehx (vector pixel, int, short *); > void vec_stvehx (vector pixel, int, unsigned short *); > > The following function was incompletely documented. The argument list lacked > a closing parenthesis. There is no function by this name. > > test_vsi_packsu_vssi_vss

Re: [PATCH] PR target/85358 patch v2: Add target hook to prevent default widening

2018-05-28 Thread Segher Boessenkool
On Fri, May 25, 2018 at 02:49:47PM -0400, Michael Meissner wrote: > * target.def (default_fp_widening_p): New target hook to automatic > widening betwen two floating point modes. "default" is a pretty bad name. The rs6000 parts are fine of course, if the rest is. Segher

[PATCH] rs6000: Fix mangling for 128-bit float

2018-05-30 Thread Segher Boessenkool
will need backporting to 8, too. Bootstrapped and tested on powerpc64-linux {-m32,-m64} (Power7) and on powerpc64le-linux (Power9). Also tested manually; testsuite patches will follow soon. I'll commit this later today if nothing comes up. Segher 2018-05-30 Segher Boesse

Re: [PATCH] rs6000: Fix mangling for 128-bit float

2018-05-30 Thread Segher Boessenkool
On Wed, May 30, 2018 at 12:58:49PM +, Segher Boessenkool wrote: > This patch changes the (C++) mangling of the 128-bit float types: > > __ieee128 becomes u9__ieee128 > __ibm128 becomes u8__ieee128 __ibm128 becomes u8__ibm128 of course. > __float12

Re: [PATCH] rs6000: Fix mangling for 128-bit float

2018-05-30 Thread Segher Boessenkool
On Wed, May 30, 2018 at 03:15:21PM +0200, Jakub Jelinek wrote: > On Wed, May 30, 2018 at 12:58:49PM +0000, Segher Boessenkool wrote: > > This patch changes the (C++) mangling of the 128-bit float types: > > > > __ieee128 becomes u9__ieee128 > > _

Re: [PATCH] rs6000: Fix mangling for 128-bit float

2018-05-30 Thread Segher Boessenkool
On Wed, May 30, 2018 at 11:03:39AM -0400, Jason Merrill wrote: > On Wed, May 30, 2018 at 9:45 AM, Segher Boessenkool > wrote: > > On Wed, May 30, 2018 at 03:15:21PM +0200, Jakub Jelinek wrote: > >> On Wed, May 30, 2018 at 12:58:49PM +, Segher Boessenkool wrote: > >

Re: [PATCH] rs6000: Fix mangling for 128-bit float

2018-05-31 Thread Segher Boessenkool
On Wed, May 30, 2018 at 06:43:23PM +0200, Jakub Jelinek wrote: > On Wed, May 30, 2018 at 08:45:22AM -0500, Segher Boessenkool wrote: > > > If you need to keep g for compatibility (you do), then why not just have > > > e (long double is double) > > > g (long dou

[PATCH] rs6000: Fix mangling for 128-bit float

2018-06-01 Thread Segher Boessenkool
erpc64le-linux (Power9). Also tested manually; testsuite patches will follow soon. Committing to trunk. Segher 2018-06-01 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of the 128-bit floating point types. Fix function comment. --- g

Re: [PATCH , rs6000] Add missing builtin test cases, fix arguments to match specifications.

2018-06-01 Thread Segher Boessenkool
get { be && lp64 } > } } } */ > +/* { dg-final { scan-assembler-times {\mrldic\M} 64 { target le } } } */ Similar. Looks great otherwise. Okay for trunk. Thanks! Segher

Re: [PATCH , rs6000] Add builtin tests for vec_madds, vec_extract_fp32_from_shortl and vec_extract_fp32_from_shorth, vec_xst_be

2018-06-01 Thread Segher Boessenkool
m_shortl and vec_extract_fp32_from_shorth. > * gcc.target/powerpc/builtins-6-runnable.c (main): Fix typo for output. > Add vec_xst_be for signed and unsigned arguments. Okay for trunk. Thanks! Segher

Re: [PATCH, rs6000 1/9] Testcase coverage for vec_xl() instrinsics

2018-06-01 Thread Segher Boessenkool
ler-times "lxvw4x|lxvd2x|lxvx|lvx" 12 } } */ This works, but some \m\M would be better. > +/* { dg-do compile { target { powerpc*-*-linux* } } } */ Tests in gcc.target/powerpc can be just { dg-do compile } btw. (Or leave even that out, it is the default; whichever you prefer). Okay for trunk if you make a proper changelog ;-) Segher

Re: [PATCH, rs6000 2/9] Testcase coverage for builtin_vec_xl() instrinsics

2018-06-01 Thread Segher Boessenkool
c/fold-vec-load-builtin_vec_xl-float.c: New. > * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-int.c: New. > * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-longlong.c: New. > * gcc.target/powerpc/fold-vec-load-builtin_vec_xl-short.c: New. OK, thanks. Segher

Re: [PATCH, rs6000 3/9] Testcase coverage for vec_vsx_ld() instrinsics

2018-06-01 Thread Segher Boessenkool
_vsx_ld-float.c : New. > * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-int.c : New. > * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-longlong.c : New. > * gcc.target/powerpc/fold-vec-load-vec_vsx_ld-short.c : New. No space before : . Looks fine otherwise :-) Segher

Re: [PATCH, rs6000 6/9] Testcase coverage for vec_vsx_st() intrinsics

2018-06-01 Thread Segher Boessenkool
_vsx_st-float.c: New. > * gcc.target/powerpc/fold-vec-store-vec_vsx_st-int.c: New. > * gcc.target/powerpc/fold-vec-store-vec_vsx_st-longlong.c: New. > * gcc.target/powerpc/fold-vec-store-vec_vsx_st-short.c: New. Okay, thanks! Segher

Re: [PATCH, rs6000 5/9] Testcase coverage for builtin_vec_xst() instrinsics

2018-06-01 Thread Segher Boessenkool
/fold-vec-store-builtin_vec_xst-float.c: New. > * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-int.c: New. > * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-longlong.c: New. > * gcc.target/powerpc/fold-vec-store-builtin_vec_xst-short.c: New. Okido. Segher

<    26   27   28   29   30   31   32   33   34   35   >