https://bugs.llvm.org/show_bug.cgi?id=50569

Douglas Yung <douglas_y...@playstation.sony.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Douglas Yung <douglas_y...@playstation.sony.com> ---
I think you are correct that the test has been passing 0 to tzcnt which results
in undefined behavior and that we were previously just getting lucky.

In investigating this issue before I reported it, I wrote a small program that
performed the actions the test was taking and compared the result for all
values of short from the min to the max and only 0 showed an issue. I then
added some code to dump out the value that was being passed to the intrinsic
and it seemed to be consistently be 0. I suspect that our convoluted
initialization using a union with doubles/shorts (int -> double -> short via
union) was always getting 0 causing the issue.

I'm going to resolve this as invalid and update our internal test to detect
when we are attempting to pass 0 to the intrinsic and select a different value
to avoid the undefined behavior.

Thanks for the help!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to