[LLVMbugs] [Bug 11771] Vectors shift operator broken

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 18 08:39:15 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=11771

Erik Schnetter <schnetter at gmail.com> changed:

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

--- Comment #7 from Erik Schnetter <schnetter at gmail.com> 2012-01-18 10:39:15 CST ---
I modified my test case to avoid this undefined behaviour (to the best of my
knowledge). Unfortunately, this slightly shifts the problem in my overall code.

I attach a new self-contained code that shows the failure. It should be silent
if all is fine; however, when built with

$ clang -o test_2fabs test_2fabs.cl

using

$ clang -v
clang version 3.1 (trunk 148238)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

this code outputs

$ ./test_2fabs 
FAIL: signbit type=float2 val=-0 res=-1 good=-1
FAIL: signbit type=float2 val=-0.10000000149011612 res=0 good=-1
FAIL: signbit type=float2 val=-0.10000000149011612 res=-1 good=-1
FAIL: signbit type=float2 val=-0 res=0 good=-1

indicating that the "signbit2" implementation contained in this code near the
top fails to correctly extract the sign bit for the second vector component.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list