<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 --- - Wrong constant folding"
   href="https://llvm.org/bugs/show_bug.cgi?id=26407">26407</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong constant folding
          </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>MacOS X
          </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: C
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ishiura-compiler@ml.kwansei.ac.jp
          </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>LLVM + clang 3.9 for x86_64 miscompiles the following code.



% cat test.c
int x =  0;
int y =  -1;

int main (void)
{
  int a = 0x7fffffff + x;
  int b = 0x7fffffff + y;
  int f = (unsigned int) a >= (unsigned int) b;
  if ( f != 1 ) { __builtin_abort(); }
  return 0;
}

% clang-3.9 test.c -O1
% ./a.out             
zsh: abort      ./a.out

% clang-3.9 -v
clang version 3.9.0 (trunk 259289)
Target: x86_64-apple-darwin14.5.0
Thread model: posix</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>