pxli168 added a comment.
I was on a vecation. LGTM, thanks!
Repository:
rL LLVM
http://reviews.llvm.org/D20133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272153: [OpenCL] Fix __builtin_astype for vec3 types.
(authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D20133?vs=59630=60043#toc
Repository:
rL LLVM
yaxunl marked 5 inline comments as done.
yaxunl added a comment.
Ping
Xiuli, could you please take a look? Thanks.
http://reviews.llvm.org/D20133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Anastasia accepted this revision.
Anastasia added a comment.
LGTM!
http://reviews.llvm.org/D20133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 59630.
yaxunl marked 10 inline comments as done.
yaxunl added a comment.
Add a sema test for mismatched type size. Fix codegen test.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
yaxunl added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:3394
@@ +3393,3 @@
+ if (NumElementsDst == 4)
+Args.push_back(llvm::UndefValue::get(CGF.Int32Ty));
+ llvm::Constant *Mask = llvm::ConstantVector::get(Args);
Anastasia wrote:
> should
Anastasia added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:3394
@@ +3393,3 @@
+ if (NumElementsDst == 4)
+Args.push_back(llvm::UndefValue::get(CGF.Int32Ty));
+ llvm::Constant *Mask = llvm::ConstantVector::get(Args);
should this be 3 unstead
yaxunl updated this revision to Diff 58991.
yaxunl marked 5 inline comments as done.
yaxunl added a comment.
Fix variable capitalization and indentation.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
Index: test/CodeGenOpenCL/as_type.cl
yaxunl marked 7 inline comments as done.
Comment at: lib/CodeGen/CGExprScalar.cpp:3420
@@ -3407,35 +3419,3 @@
llvm::Type *SrcTy = Src->getType();
- if (isa(DstTy) && isa(SrcTy)) {
-unsigned numElementsDst = cast(DstTy)->getNumElements();
-unsigned numElementsSrc =
Anastasia added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:3403
@@ +3402,3 @@
+static Value *ConvertVec3AndVec4(CGBuilderTy , CodeGenFunction ,
+ Value *Src, unsigned numElementsDst) {
+ llvm::Value *UnV = llvm::UndefValue::get(Src->getType());
yaxunl updated this revision to Diff 57393.
yaxunl added a comment.
Update test.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
Index: test/CodeGenOpenCL/as_type.cl
===
---
yaxunl updated this revision to Diff 57392.
yaxunl added a comment.
Add a test for casting char16 to i3 as Alexey suggested.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
Index: test/CodeGenOpenCL/as_type.cl
bader accepted this revision.
bader added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: test/CodeGenOpenCL/as_type.cl:6
@@ +5,3 @@
+
+//CHECK: define spir_func <3 x i8> @f1(<4 x i8> %[[x:.*]])
+//CHECK: %[[astype:.*]] = shufflevector <4 x i8>
yaxunl created this revision.
yaxunl added reviewers: Anastasia, pxli168, bader.
yaxunl added subscribers: cfe-commits, tstellarAMD.
__builtin_astype does not generate correct LLVM IR for vec3 types. This patch
inserts bitcasts to/from vec4 when necessary in addition to generating vector
14 matches
Mail list logo