Skip to content

Commit

Permalink
BUG: simplify code remove strict aliasing violation
Browse files Browse the repository at this point in the history
Didn't think the violation could cause issues but apparently some
compilers do mess it up. Also the old code is overly complicated, don't
know what I was thinking ...

Closes numpygh-6251
  • Loading branch information
juliantaylor authored and andsor committed Aug 26, 2015
1 parent 762c6f1 commit ccfa344
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions numpy/core/src/umath/simd.inc.src
Expand Up @@ -520,8 +520,7 @@ sse2_ordered_cmp_@kind@_@TYPE@(const @type@ a, const @type@ b)
@vtype@ v = @vpre@_@VOP@_@vsufs@(@vpre@_load_@vsufs@(&a),
@vpre@_load_@vsufs@(&b));
@vpre@_store_@vsufs@(&tmp, v);
return sizeof(@type@) == 4 ?
(*(npy_uint32 *)&tmp) & 1 : (*(npy_uint64 *)&tmp) & 1;
return !(tmp == 0.);
}

static void
Expand Down

0 comments on commit ccfa344

Please sign in to comment.