[PATCH] D33353: [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element

Ulrich Weigand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 29 05:35:20 PDT 2017


uweigand added a comment.

The problem is that the new test case you added does not contain a -triple argument in the compile command.  This means that the compile targets the native architecture on the build system, whatever this is.  Since OpenCL support on different architectures may be different (e.g. some may support the cl_khr_fp64 extension by default while others do not), you see the error only on some build architectures.

If you want to see the error, I guess you can force targeting SystemZ by adding "-triple s390x-ibm-linux-gnu" to the compile command.

To actually fix the problem, as mentioned above, add a -triple line that specifies an architecture where the extension is always known to be present.  (Or else, I think you can force the extension to be available even if it is not by default on a target.)


https://reviews.llvm.org/D33353





More information about the cfe-commits mailing list