<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 --- - r244578 broke x86 codegen for -Oz"
   href="https://llvm.org/bugs/show_bug.cgi?id=24649">24649</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r244578 broke x86 codegen for -Oz
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>glider@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For the following testcase:

$ cat compress.c
static int zisofs_readpage() {
  struct page *pages[({    (1 << (*(unsigned char *)(0xfeedface)) );    } )];
  return zisofs_uncompress_block(0, 0, 0, 0, pages, 0, 0);
}
int (*readpage)() = zisofs_readpage;

Clang r244578 reports an error when compiling with -Oz and -no-integrated-as:

$ clang -target x86_64-cros-linux-gnu  -no-integrated-as -Oz -w   -c  
compress.c
/tmp/compress-1e6ca5.s: Assembler messages:
/tmp/compress-1e6ca5.s:35: Error: operand type mismatch for `pop'
/tmp/compress-1e6ca5.s:36: Error: operand type mismatch for `pop'
clang-3.8: error: assembler command failed with exit code 1 (use -v to see
invocation)

The same testcase compiles fine with Clang r244577.
It also compiles with r244578 if either -Oz or -no-integrated-as is removed
from the command line.</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>