<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:schnetter@gmail.com" title="Erik Schnetter <schnetter@gmail.com>"> <span class="fn">Erik Schnetter</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - OpenCL shift counts can overflow"
   href="http://llvm.org/bugs/show_bug.cgi?id=11555">bug 11555</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - OpenCL shift counts can overflow"
   href="http://llvm.org/bugs/show_bug.cgi?id=11555#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - OpenCL shift counts can overflow"
   href="http://llvm.org/bugs/show_bug.cgi?id=11555">bug 11555</a>
              from <span class="vcard"><a class="email" href="mailto:schnetter@gmail.com" title="Erik Schnetter <schnetter@gmail.com>"> <span class="fn">Erik Schnetter</span></a>
</span></b>
        <pre>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].</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>