[PATCH] D15603: [OpenCL] Pipe type support
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 29 03:37:48 PST 2016
uweigand added a comment.
In http://reviews.llvm.org/D15603#338593, @Anastasia wrote:
> Yes, I see that it happens only for some vector types. The CodeGen follows quite different paths for both targets. And in the case of s390x-linux-gnu it ends up in ABIArgInfo::Indirect case of the second switch statement where an additional pointer will be added here:
> ArgTypes[FirstIRArg] = LTy->getPointerTo();
> I don't have enough knowledge at the moment of this ABI to tell whether it's Ok, but the generated code appears to be completely wrong.
Well, yes, on SystemZ we pass 16-byte vector types via implicit reference (using ABIArgInfo::Indirect) in the default case, i.e. when targeting an older CPU without SIMD. But the code generated for OpenCL pipes doesn't actually seem to correctly implement that convention either ... (It does work for normal calls via C/C++/...)
> As a temporary workaround to fix your build bot, I suggest you to add '-triple x86_64-linux-gnu' into RUN line of the test:
> -// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -o - %s | FileCheck %s
> +// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -o - -triple x86_64-linux-gnu %s | FileCheck %s
> It has already been done before in OpenCL tests as we don't support most of targets anyways.
OK, I've checked this in as rev. 259183. Thanks!
More information about the cfe-commits