[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-19 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284579: [Sema] Gcc compatibility of vector shift (authored by asbokhan). Changed prior to commit: https://reviews.llvm.org/D24669?vs=74269&id=75130#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-17 Thread Bruno Cardoso Lopes via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Ok, great! LGTM https://reviews.llvm.org/D24669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-11 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8787 } +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { + const BuiltinType *LHSBT = LHSEleType->getAs(); bruno wrote: > vbyakovlcl wrote: > > bruno wrote: > > > v

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-11 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8787 } +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { + const BuiltinType *LHSBT = LHSEleType->getAs(); vbyakovlcl wrote: > bruno wrote: > > vbyakovlcl wrote: > > > b

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-11 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8787 } +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { + const BuiltinType *LHSBT = LHSEleType->getAs(); bruno wrote: > vbyakovlcl wrote: > > bruno wrote: > > > B

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-11 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl updated this revision to Diff 74269. https://reviews.llvm.org/D24669 Files: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td llvm/tools/clang/lib/Sema/SemaExpr.cpp llvm/tools/clang/test/CodeGen/vecshift.c llvm/tools/clang/test/Sema/vecshift.c Index: llvm/tools/clang

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-10 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8795-8798 +if (S.Diags.getDiagnosticLevel( +diag::warn_typecheck_vector_element_sizes_not_equal, Loc) == +DiagnosticsEngine::Level::Error) + return Qual

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-10 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8787 } +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { + const BuiltinType *LHSBT = LHSEleType->getAs(); vbyakovlcl wrote: > bruno wrote: > > Besides `__ext_vector_typ

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-10 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td:2306 + "vector operands do not have the same elements sizes (%0 and %1)">, + InGroup>, DefaultError; def err_ext_vector_component_exceeds_length : Error<

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-10 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl updated this revision to Diff 74123. https://reviews.llvm.org/D24669 Files: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td llvm/tools/clang/lib/Sema/SemaExpr.cpp llvm/tools/clang/test/CodeGen/vecshift.c llvm/tools/clang/test/Sema/vecshift.c Index: llvm/tools/clang

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-07 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a reviewer: bruno. bruno added inline comments. Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td:2306 + "vector operands do not have the same elements sizes (%0 and %1)">, + InGroup>, DefaultError; def err_ext_vector_component_exceeds_length

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-05 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. > ahatanak wrote in SemaExpr.cpp:8787 > Is it possible to use ASTContext::getTypeSize here? You are right. https://reviews.llvm.org/D24669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-05 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl updated this revision to Diff 73642. https://reviews.llvm.org/D24669 Files: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td llvm/tools/clang/lib/Sema/SemaExpr.cpp llvm/tools/clang/test/CodeGen/vecshift.c llvm/tools/clang/test/Sema/vecshift.c Index: llvm/tools/clan

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. > SemaExpr.cpp:8787 > } > +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { > + const BuiltinType *LHSBT = LHSEleType->getAs(); Is it possible to use ASTContext::getTypeSize here? https://reviews.llvm.org/D24669 __

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-04 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl removed rL LLVM as the repository for this revision. vbyakovlcl updated this revision to Diff 73468. https://reviews.llvm.org/D24669 Files: llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td llvm/tools/clang/lib/Sema/SemaExpr.cpp llvm/tools/clang/test/Sema/vecshift.c In

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-04 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. > aaron.ballman wrote in DiagnosticGroups.td:522 > I would not add this as a diagnostic group, but instead use an ad-hoc group > on the diagnostic itself. I don't think this is going to see very many > diagnostics covered by the same group, but if that turns ou

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-03 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > vbyakovlcl wrote in DiagnosticGroups.td:522 > Gcc prints error messages > > t.c:21:13: error: invalid operands to binary << (have vector_int8 and > vector_short8) > > vi8 = vi8 << vs8; > > I could not find a flag controlling this error. I would not ad

Re: [PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-26 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added inline comments. Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td:522 @@ -521,2 +521,3 @@ def GNUZeroVariadicMacroArguments : DiagGroup<"gnu-zero-variadic-macro-arguments">; +def GNUVecElemSize : DiagGroup<"gnu-vec-elem-size">; def Fallback

Re: [PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-26 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24669#548984, @vbyakovlcl wrote: > Clang 3.8 balances vector shift operand erroneous using CheckVectorOperands > which converts one of operand to the type of another. In > https://reviews.llvm.org/D21678 it was fixed by using checkVect

Re: [PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-21 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl added a comment. Clang 3.8 balances vector shift operand erroneous using CheckVectorOperands which converts one of operand to the type of another. In https://reviews.llvm.org/D21678 it was fixed by using checkVectorShift instead. As result clang does not emit error if shift operands

Re: [PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-21 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In clang 3.8, your test code already produces a diagnostic for me: http://coliru.stacked-crooked.com/a/752a4ea34123bdae Repository: rL LLVM https://reviews.llvm.org/D24669 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-09-16 Thread Vladimir Yakovlev via cfe-commits
vbyakovlcl created this revision. vbyakovlcl added reviewers: aaron.ballman, ahatanak. vbyakovlcl added a subscriber: cfe-commits. vbyakovlcl set the repository for this revision to rL LLVM. Gcc prints error if elements of left and right parts of a shift have different sizes. This patch is provid