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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 14:00:58 PDT 2016


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 shuffle. A codegen test is added.

http://reviews.llvm.org/D20133

Files:
  lib/CodeGen/CGExprScalar.cpp
  test/CodeGenOpenCL/as_type.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20133.56809.patch
Type: text/x-patch
Size: 5926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160510/4d75f0b6/attachment.bin>


More information about the cfe-commits mailing list