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

Erik Schnetter <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Erik Schnetter <[email protected]> ---
You are correct -- if the arguments are scalars, integer promotion applies.

However, if the left argument of the shift operation is a vector, then integer
promotion does not apply (also OpenCL 6.3.j). This test case demonstrates the
problem:

typedef char char2  __attribute__((__ext_vector_type__(2)));

int main(int argc, char **argv)
{
  char2 x = (char2)1 << (char2)9;
  printf("[%d,%d]\n", x.s0, x.s1);
  return 0;
}

It should output [2,2], but does output [0,0].

-- 
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