http://llvm.org/bugs/show_bug.cgi?id=15785

            Bug ID: 15785
           Summary: OpenCL errors using vector/scalar conditionals and
                    short integer types
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10371
  --> http://llvm.org/bugs/attachment.cgi?id=10371&action=edit
.cl test file using short integer vector/scalar selection

Using an extended vector conditional on short integer types fails when one of
the operands is a scalar, because it performs usual unary casts before checking
compatibility between the scalar and vector types, causing type
incompatibilities incongruent with the OpenCL 1.1 Specification 6.3.i.

Quick test case attached, which gives the following errors:


test_conditional.cl:10:22: error: can't convert between vector values of
different
      size ('int' and 'short4')
  avec = conditional ? default_val : avec;
                     ^ ~~~~~~~~~~~   ~~~~
test_conditional.cl:12:22: error: can't convert between vector values of
different
      size ('short4' and 'int')
  avec = conditional ? avec : default_val;
                     ^ ~~~~   ~~~~~~~~~~~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to