<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Use power of 2 operations for bitfields"
   href="https://llvm.org/bugs/show_bug.cgi?id=23320">23320</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use power of 2 operations for bitfields
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pete.cooper@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>r235528 changed MachineOperand::OpKind from an unsigned char to a bitfield. 
This was to optimize the accesses of the bitfields after it.

We had a struct something like 

struct MachineOperand {
  unsigned char OpKind;
  unsigned int bitfield1 : 1;
  unsigned int bitfield2 : 1;
...
}

Although the 24-bits of bitfields and the unsigned char shared 32-bits of
storage space, the actual accesses to the bitfields were generated as i24
load/store which isn't legal.  This ultimately leads to the backend having to
split the i24 in to i8 and i16 operations.

We should see if its possible for clang to emit the unsigned char and bitfields
as an i32 given that this is how they are stored.</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>