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 jaimefrio committed Mar 15, 2016
1 parent 10f2b7a commit 7a3681c
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 @@ -543,8 +543,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 7a3681c

Please sign in to comment.