Re: C PATCH to add __atomic_fetch_* optimization for _Atomics (PR c/68908) (v2)

2015-12-22 Thread Joseph Myers
On Mon, 21 Dec 2015, Marek Polacek wrote: > Uuugh, sorry about that. Fixed in this version and I've added a run-time > test to verify this issue. In addition to that, I've also added a new test > that checks the size of lhs_type -- so that we know we can use some _N variant > of the atomic fet

Re: C PATCH to add __atomic_fetch_* optimization for _Atomics (PR c/68908) (v2)

2015-12-21 Thread Marek Polacek
On Fri, Dec 18, 2015 at 09:10:13PM +, Joseph Myers wrote: > On Fri, 18 Dec 2015, Marek Polacek wrote: > > > + tree sz = TYPE_SIZE_UNIT (TREE_TYPE (lhs_type)); > > + rhs = fold_build2_loc (loc, MULT_EXPR, rhs_type, rhs, > > +convert (rhs_type, sz)); > > Conv