This revision was automatically updated to reflect the committed changes.
Closed by commit rL281669: [Sema] Allow shifting a scalar operand by a vector
operand. (authored by ahatanak).
Changed prior to commit:
https://reviews.llvm.org/D24467?vs=71545=71569#toc
Repository:
rL LLVM
vbyakovlcl updated this revision to Diff 71545.
https://reviews.llvm.org/D24467
Files:
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/lib/Sema/SemaExpr.cpp
vbyakovlcl added inline comments.
Comment at: llvm/tools/clang/test/CodeGen/vecshift.c:43
@@ +42,3 @@
+ vi8 = 1 << vi8;
+// CHECK: [[t2:%.+]] = load <8 x i32>, <8 x i32>* @vi8, align 32
+// CHECK: shl <8 x i32> , [[t2]]
ahatanak wrote:
> This test fails on my
ahatanak added a comment.
LGTM with a nit in test case.
Comment at: llvm/tools/clang/test/CodeGen/vecshift.c:43
@@ +42,3 @@
+ vi8 = 1 << vi8;
+// CHECK: [[t2:%.+]] = load <8 x i32>, <8 x i32>* @vi8, align 32
+// CHECK: shl <8 x i32> , [[t2]]
This test fails on
vbyakovlcl updated this revision to Diff 71498.
https://reviews.llvm.org/D24467
Files:
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/lib/Sema/SemaExpr.cpp
vbyakovlcl added inline comments.
Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8790
@@ -8774,3 +8789,3 @@
S.Context.getExtVectorType(RHSEleType, LHSVecTy->getNumElements());
RHS = S.ImpCastExprToType(RHS.get(), VecTy, CK_VectorSplat);
}
ahatanak added inline comments.
Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8751
@@ -8747,3 +8750,3 @@
// OpenCL v1.1 s6.3.j says that the operands need to be integers.
if (!LHSEleType->isIntegerType()) {
Should we mention that any vectors used as
vbyakovlcl added inline comments.
Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8733
@@ -8731,2 +8732,3 @@
if (!IsCompAssign) {
-LHS = S.UsualUnaryConversions(LHS.get());
+if (S.LangOpts.OpenCL || S.LangOpts.ZVector)
+ LHS =
vbyakovlcl removed rL LLVM as the repository for this revision.
vbyakovlcl changed the visibility of this Differential Revision from "All
Users" to "Public (No Login Required)".
vbyakovlcl updated this revision to Diff 71135.
https://reviews.llvm.org/D24467
Files:
ahatanak added inline comments.
Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8733
@@ -8731,2 +8732,3 @@
if (!IsCompAssign) {
-LHS = S.UsualUnaryConversions(LHS.get());
+if (S.LangOpts.OpenCL || S.LangOpts.ZVector)
+ LHS = S.UsualUnaryConversions(LHS.get());
vbyakovlcl created this revision.
vbyakovlcl added reviewers: ahatanak, aaron.ballman.
vbyakovlcl added subscribers: andreybokhanko, cfe-commits.
vbyakovlcl set the repository for this revision to rL LLVM.
vbyakovlcl changed the visibility of this Differential Revision from "Public
(No Login
11 matches
Mail list logo