[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Sema/altivec-generic-overload.c:73 + + __v16sc *gv1_p = convert1(gv1); + __v16uc *gv2_p = convert1(gv2);

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish marked an inline comment as done. wuzish added inline comments. Comment at: clang/test/SemaCXX/vector.cpp:26 float = f1(ll16); - f1(c16e); // expected-error{{call to 'f1' is ambiguous}} - f1(ll16e); // expected-error{{call to 'f1' is ambiguous}} + f1(c16e); +

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish updated this revision to Diff 173981. wuzish added a comment. Use return type to distinguish which overload candidate is chosen because different candidate has different pointer return type which can not be converted implicitly without reporting error. https://reviews.llvm.org/D53417

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/altivec-generic-overload.c:74 + convert1(gv1); + // CHECK: call void @_Z8convert1Dv16_a(<16 x i8> %{{[0-9]+}}) + convert1(gv2); wuzish wrote: > hubert.reinterpretcast wrote: > >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-13 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/test/CodeGen/altivec-generic-overload.c:74 + convert1(gv1); + // CHECK: call void @_Z8convert1Dv16_a(<16 x i8> %{{[0-9]+}}) + convert1(gv2); hubert.reinterpretcast wrote: > Checking that the call is to the

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/altivec-generic-overload.c:74 + convert1(gv1); + // CHECK: call void @_Z8convert1Dv16_a(<16 x i8> %{{[0-9]+}}) + convert1(gv2); Checking that the call is to the expected target in

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish marked 2 inline comments as done. wuzish added a comment. The updated patch now extended the scope and can include the case. https://reviews.llvm.org/D53417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish updated this revision to Diff 173276. wuzish added a comment. Extend the scope to all vector type as one comment suggested. > a conversion sequence that bitcasts a vector should be ranked worse than one > that does not, regardless of the kind of vector in use. Which is also made code

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added a comment. In https://reviews.llvm.org/D53417#1292404, @rsmith wrote: > I like the direction here, and I'd like to see this applied generally: a > conversion sequence that bitcasts a vector should be ranked worse than one > that does not, regardless of the kind of vector in use.

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > some test points check the error report for ambiguous call because of too > many implicit cast choices from ext_vector_type to vector type. It appears the answer is to update these tests and remove the restriction on the type class.

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I like the direction here, and I'd like to see this applied generally: a conversion sequence that bitcasts a vector should be ranked worse than one that does not, regardless of the kind of vector in use. https://reviews.llvm.org/D53417

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. @hubert.reinterpretcast Have your comments been addressed adequately in the latest version of the patch? Do you have an opinion on adding the test case I proposed? Comment at: clang/test/Sema/altivec-generic-overload.c:1 +// RUN: %clang_cc1 %s

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-08 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added a comment. Gentle ping again since it's a critical patch. Could you please have a more review or give it LGTM if it's LGTM to you. Also welcome new comments. https://reviews.llvm.org/D53417 ___ cfe-commits mailing list

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-04 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish marked an inline comment as done. wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false;

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-04 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish marked an inline comment as done. wuzish added a comment. Gentle ping. Could anyone else have a more review? https://reviews.llvm.org/D53417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-02 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast wrote: > wuzish

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-11-01 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast wrote: > wuzish

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast wrote: > wuzish

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Zixuan Wu via Phabricator via cfe-commits
wuzish added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast wrote: >

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; Considering that this is