<html>
    <head>
      <base href="http://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 --- - X86InstrInfo.cpp:3791: valgrind problems"
   href="http://llvm.org/bugs/show_bug.cgi?id=19932">19932</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>X86InstrInfo.cpp:3791: valgrind problems
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dcb314@hotmail.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>Created <span class=""><a href="attachment.cgi?id=12597" name="attach_12597" title="C source code">attachment 12597</a> <a href="attachment.cgi?id=12597&action=edit" title="C source code">[details]</a></span>
C source code

Attached source code, when compiled with flag -O2 by trunk dated 20140602,
running under valgrind, says

==20797== Conditional jump or move depends on uninitialised value(s)
==20797==    at 0x1CC7A9A:
llvm::X86InstrInfo::optimizeCompareInstr(llvm::Machin
eInstr*, unsigned int, unsigned int, int, int, llvm::MachineRegisterInfo
const*)
 const (X86InstrInfo.cpp:3791)
==20797==    by 0x1FBDD31: (anonymous
namespace)::PeepholeOptimizer::runOnMachin
eFunction(llvm::MachineFunction&) (PeepholeOptimizer.cpp:322)
==20797==    by 0x2562BA8: llvm::FPPassManager::runOnFunction(llvm::Function&)
(
LegacyPassManager.cpp:1545)
==20797==    by 0x256334A: llvm::legacy::PassManagerImpl::run(llvm::Module&)
(Le
gacyPassManager.cpp:1565)

X86InstrInfo.cpp:3791 is

    if ((ShouldUpdateCC || IsSwapped) && NewCC != OldCC) {

I checked all of these local variables and OldCC was the only
one that wasn't initialised at its declaration. 

That might be the smoking gun.</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>