[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D30816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91713. echuraev marked 2 inline comments as done. https://reviews.llvm.org/D30816 Files: include/clang/Sema/Overload.h lib/Sema/SemaOverload.cpp test/CodeGenOpenCL/overload.cl test/SemaOpenCL/overload_addrspace_resolution.cl Index:

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/overload_addrspace_resolution.cl:1 -// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple x86_64-unknown-unknown %s | FileCheck %s +// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple spir-unknown-unknown %s

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: test/SemaOpenCL/overload_addrspace_resolution.cl:1 -// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple x86_64-unknown-unknown %s | FileCheck %s +// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple spir-unknown-unknown %s |

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-14 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 91691. echuraev marked an inline comment as done. https://reviews.llvm.org/D30816 Files: include/clang/Sema/Overload.h lib/Sema/SemaOverload.cpp test/SemaOpenCL/overload_addrspace_resolution.cl Index: test/SemaOpenCL/overload_addrspace_resolution.cl

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/overload-scalar-widening.cl:4 + +typedef short short4 __attribute__((ext_vector_type(4))); + I am thinking could this be a CodeGen test instead and we could check that the right overload is selected

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-10 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. Herald added a subscriber: yaxunl. I added a new rank to ImplicitConversionRank enum to resolve the function overload ambiguity with vector types. Rank of scalar types conversion is lower than vector splat. So, we can choose which function should we call. See