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
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
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
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
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
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
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
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
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<
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
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
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
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
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
__
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
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
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
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
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
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
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
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
22 matches
Mail list logo