Only test case is provided, no patch.
It works fine in current version of LLVM.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGenOpenCL/15685 - OpenCL 'char' is not signed.patch | ||
---|---|---|
1 | This certainly should be a Sema check, not codegen. |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | Why it's not OpenCL-specific? |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | OpenCL C standard table 6.1.1: The test is put in OpenCL folder, leaving possibility to have char unsigned in other platforms. |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | How the folder would enforce OpenCL mode? Why the test won't fail on unsigned targets? |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | I think SemaOpenCL is the folder where from CL and only CL tests run. On unsigned targets it wouldn't run, it runs only on OpenCL. Please correct me if I am wrong. |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | You're certainly wrong. For now the test would magically work because of .cl extension which will switch the driver in OpenCL mode. No folder name is involved. In order to make this test proper you need to check that no targer-specific information would "leak" in OpenCL mode, even if you force unsigned char by default. Also, please familiarize yourself with testing docs (http://llvm.org/docs/TestingGuide.html#regression-test-structure) |
test/SemaOpenCL/ocl-char-is-not-signed.cl | ||
---|---|---|
1 ↗ | (On Diff #45977) | Ok, will know. Then there's no problem. |
I am missing to understand the intention of this change. Are you trying to improve the testing for OpenCL?
Instead of checking by division by zero, I've used _StaticAssert. Functionally bo change, but more understandable.
This certainly should be a Sema check, not codegen.