[Bug target/57156] miscompilation of call to _mm_cmpeq_epi8(a, a) or _mm_comtrue_epu8(a, a) with uninitialized a

kretz at kde dot org gcc-bugzilla@gcc.gnu.org
Fri May 3 09:56:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57156

--- Comment #5 from Matthias Kretz <kretz at kde dot org> 2013-05-03 09:56:00 UTC ---
(In reply to comment #4)
> I wouldn't know how to counter this for the _mm_cmpeq_epi8 case

Actually, I have yet to find something in the standard that says using an
uninitialized __m128 is undefined behavior. ;)
Thus the only standard that would define the rules here would be Intel's, no?
And from reading their docs I understand that calling an intrinsics maps to the
behavior you'd get when using the associated instruction. In this case
comparing any XMM register with itself will result in what I expect.



More information about the Gcc-bugs mailing list