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

            Bug ID: 39208
           Summary: IMAGE_SUPPORT macro should not be automatically
                    defined for spir
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangb...@nondot.org
          Reporter: omer.paparo.bi...@intel.com
                CC: llvm-bugs@lists.llvm.org, yaxun....@amd.com

The differential revision https://reviews.llvm.org/D40252 introduced an
automatic definition of the macro IMAGE_SUPPORT when "spir" or "spir64" is
present in the triple, forcing that macro to be present.
I'm working on a non-published device which follows the 1.2 spec and does not
support images (i.e. when queried using
https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clGetDeviceInfo.html
for CL_DEVICE_IMAGE_SUPPORT it returns false). spir is my default target, and
when compiling the IMAGE_SUPPORT is defined although the device does not
support images. This causes some conformance tests to fail, most notably the
test "kernel_preprocessor_macros" from the basic suite, with the message
"FAILURE: __IMAGE_SUPPORT__ defined to value 1 even though images aren't
supported".
I believe that this macro should not be added in the manner it is done today.

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

Reply via email to