Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-11 Thread Xiuli PAN via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-08 Thread Yaxun Liu via 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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-06 Thread Yaxun Liu via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-06 Thread Anastasia Stulova via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-03 Thread Yaxun Liu via 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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-03 Thread Yaxun Liu via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-03 Thread Anastasia Stulova via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-30 Thread Yaxun Liu via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-30 Thread Yaxun Liu via cfe-commits
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 =

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-23 Thread Anastasia Stulova via cfe-commits
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());

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-16 Thread Yaxun Liu via cfe-commits
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 === ---

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-16 Thread Yaxun Liu via cfe-commits
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

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-12 Thread Alexey Bader via cfe-commits
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>

[PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-05-10 Thread Yaxun Liu via cfe-commits
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