[LLVMdev] [PATCH] R600 - Fix zero extend of i1

Jon Pry jonpry at gmail.com
Mon Dec 30 20:50:23 PST 2013


Hi,

    When trying to compile a trivial opencl kernel such as:

__kernel void if_eq(__global int * out, int arg0, int arg1){
    out[0] = arg0==arg1?0:1;
}

   Clang generates IR like:

  %1 = icmp eq i32 %arg0, %arg1
  %. = zext i1 %1 to i32

   This eventually crashes ISel on R600. Attached patch adds a selector so
it will compile.

Regards,

Jon Pry
jonpry at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131230/057c13c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-Fix-zero-extend-of-i1.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131230/057c13c5/attachment.bin>


More information about the llvm-dev mailing list