Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-24 Thread Marc Glisse
certainly don't want to re-fold everything all the time. VRP is kind of a special case, every variable for which it finds a new/improved range could be considered changed, since it may trigger some extra transformation in match.pd (same for CCP and the nonzero mask). -- Marc Glisse

Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-21 Thread Marc Glisse
plicate parts of what match.pd does, but certainly doable -- I've even prototyped it. Thoughts? I believe we are supposed to call match.pd from VRP eventually (though that may not have happened yet), so the test could probably also be done there, if that looks more convenient and we decide not to remove single_use completely for this transformation. -- Marc Glisse

Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs

2017-01-12 Thread Marc Glisse
456ULL), something else? Yes, unless we teach libcpp about larger than 64bit literals. Teaching libcpp about 128bit literals sounds like a much nicer idea indeed... -- Marc Glisse

Re: [PATCH] Optimize X << Y with low bits of Y known to be 0 (PR tree-optimization/71563)

2016-12-20 Thread Marc Glisse
R tree-optimization/71563 * match.pd: Simplify X << Y into X if Y is known to be 0 or out of range value - has low bits known to be zero. Hello, would it make sense to extend it to rotates later? Note that you can write (shift @0 SSA_NAME@1) in the pattern instead of a separate tes

Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-13 Thread Marc Glisse
On Tue, 13 Dec 2016, Richard Biener wrote: On Sat, Dec 10, 2016 at 7:59 PM, Marc Glisse <marc.gli...@inria.fr> wrote: On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: On Saturday 10 December 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Marc Glisse wrote: On Sat, 10 Dec 2016,

Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-10 Thread Marc Glisse
On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: On Saturday 10 December 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: Replaces the definitions of the shift intrinsics with GCC extension syntax to allow GCC to reason about

Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-10 Thread Marc Glisse
On Sat, 10 Dec 2016, Marc Glisse wrote: On Sat, 10 Dec 2016, Allan Sandfeld Jensen wrote: Replaces the definitions of the shift intrinsics with GCC extension syntax to allow GCC to reason about what the instructions does. Tests are added to ensure the intrinsics still produce the right

Re: [PATCH] [x86] Don't use builtins for SIMD shifts

2016-12-10 Thread Marc Glisse
revent from discussing it) -- Marc Glisse

Re: [PATCH] Fix A < 0 ? C : 0 optimization (PR tree-optimization/78720)

2016-12-10 Thread Marc Glisse
s for now. -- Marc Glisse

Re: [PATCH] Fix A < 0 ? C : 0 optimization (PR tree-optimization/78720)

2016-12-09 Thread Marc Glisse
d), so it already has the appropriate 1 or 0 in the right place. -- Marc Glisse

Re: [PATCH] improve folding of expressions that move a single bit around

2016-11-26 Thread Marc Glisse
ild_int_cst (integer_type_node, shift); }) + (convert (rshift @2 { build_int_cst (integer_type_node, -shift); }) What happens if @1 is the sign bit, in a signed type? Do we get an arithmetic shift right? -- Marc Glisse

Re: [Patch][i386] PR 70118: Fix ubsan warning on SSE2 loadl_epi64 and storel_epi64

2016-11-26 Thread Marc Glisse
much, in places where the lack of may_alias might be an issue... Or maybe I am afraid for no reason and even here the may_alias is unnecessary. Looking at dumps also makes me wonder if we could simplify view_convert_expr(bit_field_expr) to just bit_field_expr when it is the only use. -- Marc Glisse

Re: [PATCH GCC]Move simplification of (A == C1) ? A : C2 to match.pd

2016-11-23 Thread Marc Glisse
= TREE_CODE (@0), cmp_code = TREE_CODE (@0); Note that you can use cmp directly, it is already equal to LT_EXPR or one of the others. -- Marc Glisse

Re: [PING] [PATCH] Fix PR31096

2016-11-22 Thread Marc Glisse
at the testsuite), but you'll need a real reviewer to approve the patch... -- Marc Glisse

Re: [PATCH, testsuite]: Fix detection of -j make argument

2016-11-22 Thread Marc Glisse
doesn't work in the later case. Attached patch reworks this functionality to detect -j correctly in all cases. Hello, I didn't read the patch, but do you think this also fixes PR 53155 ? -- Marc Glisse

Re: [libgcc] Protect __TMC_END__ - __TMC_LIST__ == 0

2016-11-20 Thread Marc Glisse
On Fri, 4 Nov 2016, Andrew Pinski wrote: On Fri, Nov 4, 2016 at 7:08 AM, Marc Glisse <marc.gli...@inria.fr> wrote: Ping https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02220.html I think this is obvious. Ok, I've committed it. -- Marc Glisse

Re: Fix PR78154

2016-11-16 Thread Marc Glisse
the patch. Note also that memcpy already has both an attribute that says that it returns its first argument, and an attribute that says that said first argument is nonnull. (I've heard some noise in C++-land about making memcpy(0,0,0) valid, but that may have just been noise) -- Marc Glisse

Re: [PATCH] Fix PR78305

2016-11-16 Thread Marc Glisse
On Wed, 16 Nov 2016, Michael Matz wrote: Hi, On Wed, 16 Nov 2016, Marc Glisse wrote: The first sentence about ORing the sign bit sounds strange (except for a sign-magnitude representation). With 2's complement, INT_MIN is -2^31, the divisors are the 2^k and -(2^k). -2 * 2^30 yields INT_MIN

Re: [PATCH] Fix PR78305

2016-11-16 Thread Marc Glisse
On Wed, 16 Nov 2016, Richard Biener wrote: On Wed, 16 Nov 2016, Marc Glisse wrote: On Wed, 16 Nov 2016, Richard Biener wrote: On Wed, 16 Nov 2016, Marc Glisse wrote: On Wed, 16 Nov 2016, Richard Biener wrote: I am testing the following to avoid undefined behavior when negating

Re: [PATCH] Fix PR78305

2016-11-16 Thread Marc Glisse
On Wed, 16 Nov 2016, Richard Biener wrote: On Wed, 16 Nov 2016, Marc Glisse wrote: On Wed, 16 Nov 2016, Richard Biener wrote: I am testing the following to avoid undefined behavior when negating a multiplication (basically extending a previous fix to properly handle negative power of two

Re: [PATCH] Fix PR78305

2016-11-16 Thread Marc Glisse
lus } */ +/* { dg-do run } */ + +int main () +{ + int a = 2; + int b = 1; + + int t = -1 * ( -0x4000 * a / ( -0x2000 + b ) ) / -1; + + if (t != 4) __builtin_abort(); + + return 0; +} -- Marc Glisse

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-11-11 Thread Marc Glisse
example) Is a builtin really needed here? What would happen if you used return __A & __B; ? -- Marc Glisse

Re: [RFC] Check number of uses in simplify_cond_using_ranges().

2016-11-10 Thread Marc Glisse
am not convinced we need the overflow stuff at all here. +(for cmp (eq ne gt ge lt le) (for cmp (simple_comparison) + (cmp (convert@0 @1) INTEGER_CST@2) + (if (TREE_CODE (@1) == SSA_NAME (cmp (convert@0 SSA_NAME@1) INTEGER_CST@2) + (cmp { @1; } (convert @2)) (cmp @1 (convert @2)) -- Marc Glisse

Re: [PATCH] Fix PR71762

2016-11-10 Thread Marc Glisse
We have a number of other optimizations that take advantage of the fact that bool is in [0, 1], even without looking at VRP, say for instance x != 0 -> x. Are we supposed to remove all of them? -- Marc Glisse

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
On Wed, 9 Nov 2016, Marc Glisse wrote: On Wed, 9 Nov 2016, Segher Boessenkool wrote: On Wed, Nov 09, 2016 at 10:54:53PM +0100, Marc Glisse wrote: match.pd transforms (A)|(B&~C) to ((A^B))^B, which is fewer operations if C is not const (and it is not on simple tests at least, this trans

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
On Wed, 9 Nov 2016, Segher Boessenkool wrote: On Wed, Nov 09, 2016 at 10:54:53PM +0100, Marc Glisse wrote: match.pd transforms (A)|(B&~C) to ((A^B))^B, which is fewer operations if C is not const (and it is not on simple tests at least, this transform is done very early already). Var

Re: [PATCH] simplify-rtx: Transform (xor (and (xor A B) C) B) with C const

2016-11-09 Thread Marc Glisse
because C only becomes a constant at that stage? -- Marc Glisse

Re: [RFC] Check number of uses in simplify_cond_using_ranges().

2016-11-08 Thread Marc Glisse
your point. (and yes, the first half would give a very general (simplify (cmp SSA_NAME@0 INTEGER_CST@1) ...), that doesn't seem so bad) -- Marc Glisse

Re: GCC 6.2.0 : What does the undocumented -r option ?

2016-11-07 Thread Marc Glisse
ning stuff is such a pain...) -- Marc Glisse

Simplify X / X, 0 / X and X % X

2016-11-04 Thread Marc Glisse
that instruction and clear the following code, which likely gives better code than replacing 0/0 with 1. Bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2016-11-07 Marc Glisse <marc.gli...@inria.fr> gcc/ * match.pd (0 / X, X / X, X % X): New simplifications. gcc/tes

Re: [libgcc] Protect __TMC_END__ - __TMC_LIST__ == 0

2016-11-04 Thread Marc Glisse
Ping https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02220.html On Thu, 27 Oct 2016, Marc Glisse wrote: Hello, some optimization patch I was working on simplified __TMC_END__ - __TMC_LIST__ == 0 to false, which is not wanted (I assume that's why it wasn't written __TMC_END__ == __TMC_LIST__

Re: Simplify X /[ex] 8 == 0

2016-11-04 Thread Marc Glisse
On Fri, 4 Nov 2016, Richard Biener wrote: On Fri, Nov 4, 2016 at 2:15 PM, Richard Biener <richard.guent...@gmail.com> wrote: On Fri, Nov 4, 2016 at 1:34 PM, Marc Glisse <marc.gli...@inria.fr> wrote: Hello, this kind of simplification is already handled by fold_comparison,

Simplify X /[ex] 8 == 0

2016-11-04 Thread Marc Glisse
org/ml/gcc-patches/2016-10/msg02220.html , I'll rerun the testsuite when that patch is in. 2016-11-07 Marc Glisse <marc.gli...@inria.fr> gcc/ * fold-const.c (fold_comparison): Ignore EXACT_DIV_EXPR. * match.pd (A /[ex] B CMP C): New simplifications. gcc/testsuite/

Re: [match.pd] Fix for PR35691

2016-11-03 Thread Marc Glisse
(double&)c==0; less so... (and I am assuming that signaling NaNs don't make the whole transformation impossible, which might be wrong) -- Marc Glisse

Re: [match.pd] Fix for PR35691

2016-11-03 Thread Marc Glisse
. (related to PR 68714) -- Marc Glisse

Re: [match.pd] Fix for PR35691

2016-11-03 Thread Marc Glisse
be cool to do the same for floats (most likely at the RTL level). -- Marc Glisse

Re: [PATCH] Fix PR77407

2016-11-01 Thread Marc Glisse
On Mon, 31 Oct 2016, Richard Biener wrote: On Fri, 28 Oct 2016, Marc Glisse wrote: On Wed, 28 Sep 2016, Richard Biener wrote: The following patch implements patterns to catch x / abs (x) and x / -x, taking advantage of undefinedness at x == 0 as opposed to the PR having testcases

Re: [PATCH, RFC, rs6000] Add overloaded built-in function support to altivec.h, and re-implement vec_add

2016-11-01 Thread Marc Glisse
specific vector types (that people probably didn't have in mind when developing the C extension)? -- Marc Glisse

Re: [PATCH] Fix PR77407

2016-10-28 Thread Marc Glisse
visions by zero. This is the reason why we don't simplify x / x to 1 or 0 / x to 0. */ Did we give up on preserving divisions by 0? Can we now do the 2 simplifications listed by the comment? -- Marc Glisse

[libgcc] Protect __TMC_END__ - __TMC_LIST__ == 0

2016-10-27 Thread Marc Glisse
Hello, some optimization patch I was working on simplified __TMC_END__ - __TMC_LIST__ == 0 to false, which is not wanted (I assume that's why it wasn't written __TMC_END__ == __TMC_LIST__ in the first place). Bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2016-10-27 Marc Glisse

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Marc Glisse
On Wed, 26 Oct 2016, Bin.Cheng wrote: On Wed, Oct 26, 2016 at 3:10 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: On Wed, Oct 26, 2016 at 3:04 PM, Marc Glisse <marc.gli...@inria.fr> wrote: On Wed, 26 Oct 2016, Bin.Cheng wrote: Thanks for reviewing, updated patch attache

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Marc Glisse
d long)(-2),3ul) seems to satisfy your conditions, but is not the same as max(-2,3) -- Marc Glisse

Re: [PATCH] Also fold bmi/bmi2/tbm bextr/bextri/bzhi/pext/pdep builtins

2016-10-22 Thread Marc Glisse
erations, which would allow constant folding as well as other optimizations. -- Marc Glisse

Re: [PATCH] Fix PR77826

2016-10-15 Thread Marc Glisse
explained in an earlier message, but we can do that later as the need arises) -- Marc Glisse

Re: how to check if target supports andnot instruction ?

2016-10-13 Thread Marc Glisse
On Thu, 13 Oct 2016, Prathamesh Kulkarni wrote: On 12 October 2016 at 14:43, Richard Biener <rguent...@suse.de> wrote: On Wed, 12 Oct 2016, Marc Glisse wrote: On Wed, 12 Oct 2016, Prathamesh Kulkarni wrote: I was having a look at PR71636 and added the following pattern to match

Re: [PATCH] Fix PR77826

2016-10-12 Thread Marc Glisse
absurd way to go about it ;-) -- Marc Glisse

Re: how to check if target supports andnot instruction ?

2016-10-12 Thread Marc Glisse
d avoid the transformation, just that we should fix the RA issue (by the way, if you have time to file a separate PR for the RA issue, that would be great, otherwise I'll try to do it at some point...). However it seems andnot isn't a standard pattern name, so am not sure how to check if target

Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-11 Thread Marc Glisse
patch). It is better to write tests for the gimple version of transformations, i.e. don't write everything as a single expression, use intermediate variables. -- Marc Glisse

Re: [PATCH] Fix PR77826

2016-10-11 Thread Marc Glisse
se (int)(b-a) could be a truncation in which case multiplying with 4 might not result in the same value as b-a truncated(?). The comment before the unpatched patterns said "sign-changing conversions" but nothign actually verified this. Might be that truncations are indeed ok now that I think

Re: [PATCH] Fix PR77826

2016-10-10 Thread Marc Glisse
On Fri, 7 Oct 2016, Richard Biener wrote: On Thu, 6 Oct 2016, Marc Glisse wrote: On Wed, 5 Oct 2016, Richard Biener wrote: The following will fix PR77826, the issue that in match.pd matching up two things uses operand_equal_p which is too lax about the type of the toplevel entity (at least

Re: [PATCH] Optimize a >= 0 && a < b if VR info says b >= 0 (PR tree-optimization/77664)

2016-10-06 Thread Marc Glisse
nd a >= b in the second). I guess that the slightly more general: X >= A && X < B where we know that A <= B --> (unsigned)X - (unsigned)A < (unsigned)B - (unsigned)A generates too many operations and does not gain anything? The case where A and B are constants seems to be handled by ifcombine, currently. -- Marc Glisse

Re: [PATCH] Fix PR77826

2016-10-06 Thread Marc Glisse
does? * match.pd ((X /[ex] A) * A -> X): Properly handle converted and constant A. This regressed int f(int*a,int*b){return 4*(int)(b-a);} -- Marc Glisse

Re: C++ PATCH for C++17 class template placeholders

2016-10-05 Thread Marc Glisse
On Wed, 5 Oct 2016, Jason Merrill wrote: On Wed, Oct 5, 2016 at 5:29 AM, Marek Polacek <pola...@redhat.com> wrote: On Wed, Oct 05, 2016 at 08:58:08AM +0200, Marc Glisse wrote: On Tue, 4 Oct 2016, Jason Merrill wrote: C++17 adds the ability to omit the template arguments for a class te

Re: [PATCH] 77864 Fix noexcept conditions for map/set default constructors

2016-10-05 Thread Marc Glisse
__noexcept_auto__ spelling) and just use that in most places where we want a conditional noexcept. -- Marc Glisse

Re: C++ PATCH for C++17 class template placeholders

2016-10-05 Thread Marc Glisse
. Is there a macro to test for this feature? I couldn't find it in the latest sg10 list. -- Marc Glisse

Re: [PATCH] Fix PR55152

2016-10-04 Thread Marc Glisse
On Tue, 4 Oct 2016, Richard Biener wrote: Possibly. Though then for FP we also want - abs (a) -> copysign (a, -1). I thought this might fix PR 62055, but at least on x86_64, we generate much worse code for copysign(,-1) than for -abs :-( -- Marc Glisse

Re: [PATCH] Fix PR77407

2016-10-01 Thread Marc Glisse
tor_size(16))); vec f(vec x){ vec y=(x<0)?-x:x; return x/y; } (I wasn't sure if you had added a feature to turn cond into vec_cond automatically in some cases) -- Marc Glisse

Re: [PATCH] Define 3-argument overloads of std::hypot for C++17 (P0030R1)

2016-09-28 Thread Marc Glisse
the C semantics. On the other hand, the paper mentions speed and convenience as the main selling points. Maybe LWG could clarify the intent? -- Marc Glisse

Re: [PATCH] Define 3-argument overloads of std::hypot for C++17 (P0030R1)

2016-09-27 Thread Marc Glisse
for errno? Otherwise, I have a hard time believing that 3 multiplications and 2 additions can be slower than 4 multiplications, 2 additions, plus a bunch of tests and divisions. -- Marc Glisse

Re: [PATCH] Handle VECTOR_CST in integer_nonzerop()

2016-09-20 Thread Marc Glisse
On Mon, 19 Sep 2016, Patrick Palka wrote: On Wed, Sep 14, 2016 at 1:58 AM, Marc Glisse <marc.gli...@inria.fr> wrote: On Fri, 19 Aug 2016, Patrick Palka wrote: On Fri, Aug 19, 2016 at 7:30 PM, Patrick Palka <patr...@parcs.ath.cx> wrote: integer_nonzerop() currently uncondition

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Marc Glisse
(align - 1), for instance. I guess people interested in performance will do for aligned new the same as for the old new: provide an inline version that skips all the overhead to forward directly to malloc/aligned_alloc (and avoid questionable calls in their code). -- Marc Glisse

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-09-15 Thread Marc Glisse
entry would also help. -- Marc Glisse

Re: [PATCH] Handle VECTOR_CST in integer_nonzerop()

2016-09-14 Thread Marc Glisse
eger_each_nonzerop vs integer_not_all_zerop? -- Marc Glisse

Re: Is this FE bug or am I missing something?

2016-09-13 Thread Marc Glisse
time, I agree that gimplifying x+1 and 1+x differently makes little sense, you could file a PR about that. -- Marc Glisse

Re: Is this FE bug or am I missing something?

2016-09-12 Thread Marc Glisse
time. -- Marc Glisse

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-10 Thread Marc Glisse
that just aborts I guess? -- Marc Glisse

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-08 Thread Marc Glisse
to gcc/config/i386/gmm_malloc.h)? A windows version with _aligned_malloc / _aligned_free would also be possible. -- Marc Glisse

Re: [patch, libstdc++] std::shuffle: Generate two swap positions at a time if possible

2016-09-01 Thread Marc Glisse
On Thu, 1 Sep 2016, Jonathan Wakely wrote: + const __uc_type __comp_range = __swap_range * (__swap_range + 1); If __swap_range is 3, then __comp_range is 10 and ??? -- Marc Glisse

match.pd: Revert a * (1 << b) relaxation

2016-08-31 Thread Marc Glisse
) +++ gcc/ChangeLog (working copy) @@ -1,10 +1,15 @@ +2016-08-31 Marc Glisse <marc.gli...@inria.fr> + + PR tree-optimization/73714 + * match.pd (a * (1 << b)): Revert change from 2016-05-23. + 2016-08-31 David Malcolm <dmalc...@redhat.com> * selftest.c: Move "names

Re: [x86] Don't use builtins for unaligned load/store

2016-08-29 Thread Marc Glisse
On Mon, 29 Aug 2016, Uros Bizjak wrote: On Mon, Aug 29, 2016 at 5:22 PM, Marc Glisse <marc.gli...@inria.fr> wrote: On Mon, 29 Aug 2016, Kirill Yukhin wrote: On 29.08.2016 14:58, Marc Glisse wrote: this patch gets rid of a few more builtins (well, I actually kept them, since Ada use

Re: [x86] Don't use builtins for unaligned load/store

2016-08-29 Thread Marc Glisse
On Mon, 29 Aug 2016, Kirill Yukhin wrote: On 29.08.2016 14:58, Marc Glisse wrote: this patch gets rid of a few more builtins (well, I actually kept them, since Ada users may still need them). I had to tweak the flags for pr59539-2.c, otherwise the compiler thinks it is more efficient to split

[x86] Don't use builtins for unaligned load/store

2016-08-29 Thread Marc Glisse
, (%rax){%k1} The changes in the signature of functions don't seem to matter, gcc apparently ignores the aligned attribute for that purpose. The last change (_mm_load_ps) is for consistency. Bootstrap+regtest on x86_64-pc-linux-gnu, with only the above regression. 2016-08-29 Marc Glisse

Re: Make max_align_t respect _Float128

2016-08-26 Thread Marc Glisse
ke powerpc didn't add the macro when they later gained __float128 support, but that would be easy to fix. -- Marc Glisse

Re: Vector unaligned load/store x86 intrinsics

2016-08-26 Thread Marc Glisse
On Fri, 26 Aug 2016, Richard Biener wrote: On Thu, Aug 25, 2016 at 9:40 PM, Marc Glisse <marc.gli...@inria.fr> wrote: Hello, I was considering changing the implementation of _mm_loadu_pd in x86's emmintrin.h to avoid a builtin. Here are 3 versions: typedef double __m128d __attri

Vector unaligned load/store x86 intrinsics

2016-08-25 Thread Marc Glisse
lignment-check stuff is not supported by gcc? -- Marc Glisse

Re: Merge switch statements in tree-cfgcleanup

2016-07-19 Thread Marc Glisse
On Tue, 19 Jul 2016, Bernd Schmidt wrote: On 07/19/2016 12:09 PM, Richard Biener wrote: I saw walks over stmts of a BB. IMHO that's a no-go. Only to find the first or last nondebug one. Is that unacceptable? Does gsi_start_nondebug_after_labels_bb not fit? -- Marc Glisse

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marc Glisse
On Wed, 13 Jul 2016, Marek Polacek wrote: On Wed, Jul 13, 2016 at 08:39:28PM +0200, Marc Glisse wrote: On Wed, 13 Jul 2016, Marek Polacek wrote: Does "__attribute__((fallthrough));" have any advantages over "__builtin_fallthrough()"? Not a strong argument, but compi

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marc Glisse
tribute (and ignore the comment, which makes both other versions less relevant). Unrelated question: are there cases where __builtin_fallthrough() has any impact on code generation? -- Marc Glisse

Re: Determine more IVs to be non-overflowing

2016-07-05 Thread Marc Glisse
on x86_64 (possibly more depending on the exact definition of largest integer). -- Marc Glisse

Re: [PATCH][vectorizer][2/2] Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-07-05 Thread Marc Glisse
targets you care about? I don't have access to Sparc, you want Rainer here (added in Cc:). (thanks for completing the patch!) -- Marc Glisse

Re: [RFC][Draft patch] Introduce IntegerSanitizer in GCC.

2016-07-04 Thread Marc Glisse
lds (sadly, the standards make it hard to avoid unsigned types...). -- Marc Glisse

Re: [PATCH v2] extend shift count warnings to vector types

2016-07-02 Thread Marc Glisse
h. (OTOH, if you decided that the same message was good enough for both...) -- Marc Glisse

Re: [PATCH PR c/71699] Handle pointer arithmetic in nonzero tree checks

2016-06-30 Thread Marc Glisse
point is that we are not allowed to transform g into f below: char*f(char*p){return p+4;} char*g(char*p){return (char*)((intptr_t)p+4);} That makes sense and seems much easier to guarantee than I feared, nice. (on the other hand, only RTL is able to simplify (long)p+4-(long)(p+4)) -- Marc Glisse

Re: [PATCH PR c/71699] Handle pointer arithmetic in nonzero tree checks

2016-06-30 Thread Marc Glisse
sions. I think this is an exciting optimization, but I was always too scared to try anything like this. -- Marc Glisse

Re: [PATCH][vectorizer][2/2] Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-06-15 Thread Marc Glisse
that's good :-) Otherwise, we might want to err on the side of caution. -- Marc Glisse

Re: [Patch] Implement is_[nothrow_]swappable (p0185r1) - 2nd try

2016-06-14 Thread Marc Glisse
ENOPATCH ;-) (I highly recommend https://gcc.gnu.org/wiki/CompileFarm ) -- Marc Glisse

Re: [PATCH][vectorizer][2/2] PR 65951: Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-06-14 Thread Marc Glisse
On Tue, 14 Jun 2016, Kyrill Tkachov wrote: On 14/06/16 08:04, Marc Glisse wrote: On Mon, 13 Jun 2016, Kyrill Tkachov wrote: The new function vect_synth_mult_by_constant that does all the hard work is very similar in structure to expand_mult_const from expmed.c but it operates on gimple SSA

Re: [PATCH][vectorizer][2/2] PR 65951: Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-06-14 Thread Marc Glisse
overflow from well-defined code. While this is fine in RTL, I would expect to need a cast to unsigned_type_for in gimple for some of the algorithms. (not completely sure, just something to look at) -- Marc Glisse

Re: [PATCH][vectorizer][2/2] PR 65951: Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-06-13 Thread Marc Glisse
nd or vector lowering to turn them to additions (though the estimated cost might be off). Any idea on the best way to handle SPARC? -- Marc Glisse

Re: [PATCH][vectorizer][2/2] PR 65951: Hook up mult synthesis logic into vectorisation of mult-by-constant

2016-06-13 Thread Marc Glisse
://gcc.gnu.org/ml/gcc-patches/2016-06/msg00881.html This one seems much better. -- Marc Glisse

Re: Vectorize 2*x as x+x if needed

2016-06-13 Thread Marc Glisse
On Mon, 13 Jun 2016, Richard Biener wrote: On Sun, Jun 12, 2016 at 11:19 AM, Marc Glisse <marc.gli...@inria.fr> wrote: Hello, canonicalizing x+x to x*2 made us regress some vectorization tests on sparc. As suggested by Richard, this lets the vectorizer handle x*2 as x+x if that helps.

Vectorize 2*x as x+x if needed

2016-06-12 Thread Marc Glisse
her in later passes. ยป Rainer bootstrapped and regtested the patch on sparc. As a bonus, it now vectorizes one more loop in gcc.dg/vect/vect-iv-9.c, I'll let someone else tweak the test (which will temporarily appear as a FAIL). 2016-06-13 Marc Glisse <marc.gli...@inria.fr> PR

Move optimize_minmax_comparison to match.pd

2016-06-12 Thread Marc Glisse
Hello, this move is pretty straightforward. The transformation would probably work just fine for any type (floats, vectors), but I didn't want the headache of checking the behavior for NaN. Bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2016-06-13 Marc Glisse <marc.gli...@inria

Re: [PATCH] Fold x/x to 1, 0/x to 0 and 0%x to 0 consistently

2016-06-08 Thread Marc Glisse
actually be, instead of !integer_zerop (@1): flag_non_call_exceptions ? tree_expr_nonzero_p (@1) : (GIMPLE || !integer_zerop (@1)) (or something similar at a different level in the call chain of course) (not that this helps in any way for the PR...) -- Marc Glisse

Re: [PATCH] Fold x/x to 1, 0/x to 0 and 0%x to 0 consistently

2016-06-08 Thread Marc Glisse
message about it, and folding might not be idempotent. But as long as we don't always perform the simplification, we need some other way to break the cycle for PR70992. -- Marc Glisse

Re: [PING] [PATCH] Fix asm X constraint (PR inline-asm/59155)

2016-06-06 Thread Marc Glisse
hing more generic). The goal of the experiment is described in PR59159 (for which "+X" is unlikely to be the right answer, in particular because it is meaningless for constants). I don't know in what context people use the "X" constraint, or even better "=X"... -- Marc Glisse

Re: An issue with GCC 6.1.0's make install?

2016-06-04 Thread Marc Glisse
the -s command line parameter yields nothing. Have I done something wrong? "nothing" is not very helpful... Surely it gave some error message. -- Marc Glisse

Re: [PATCH] match.pd: optimize unsigned mul overflow check

2016-05-29 Thread Marc Glisse
n't ask because I was assuming the latter, but I am not 100% certain) -- Marc Glisse

Re: [PATCH] match.pd: optimize unsigned mul overflow check

2016-05-29 Thread Marc Glisse
is may require an extra check like tree_expr_nonzero_p, although we are quite inconsistent about this (we don't simplify x/x to 1, but we do simplify 0%x to 0 if x is not (yet) known to be the constant 0). We'll see what the reviewers think... Any plan on optimizing the 'B && ovf' form? -- Marc Glisse

Re: Implicit conversion to a generic vector type

2016-05-27 Thread Marc Glisse
not, currently), they will submit a patch to gcc-patc...@gcc.gnu.org, which will be reviewed. Note that a patch needs to include testcases (see the files in gcc/testsuite/g++.dg for examples). If you are interested, you could give it a try... -- Marc Glisse

<    1   2   3   4   5   6   7   8   9   10   >