<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 --- - MSVC: Instruction does not dominate all uses"
   href="https://llvm.org/bugs/show_bug.cgi?id=25698">25698</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MSVC: Instruction does not dominate all uses
          </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>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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alex@crichton.co
          </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>When compiling this IR via `llc -filetype=obj`

target triple = "i686-pc-windows-msvc"                             

declare i32 @_except_handler3(...)                                 
declare void @bar1(i32*)                                           
declare void @bar2()                                               

define void @foo(i32**) personality i32 (...)* @_except_handler3 { 
entry-block:                                                       
  invoke void @bar2()                                              
          to label %done unwind label %cleanup1                    

done:                                                              
  ret void                                                         

cleanup1:                                                          
  %pad2 = cleanuppad []                                            
  invoke void @bar2()                                              
          to label %cleanupdone unwind label %cleanup2             

cleanupdone:                                                       
  cleanupret %pad2 unwind label %cleanup2                          

cleanup2:                                                          
  %pad3 = cleanuppad []                                            
  %t6 = load i32*, i32** %0                                        
  br label %loop                                                   

loop:                                                              
  invoke void @bar2()                                              
          to label %loop unwind label %cleanup3                    

cleanup3:                                                          
  %pad4 = cleanuppad []                                            
  call void @bar1(i32* %t6)                                        
  unreachable                                                      
}                                                                  


it prints out:

Instruction does not dominate all uses!
  %t6 = load i32*, i32** %0
  call void @bar1(i32* %t6)
LLVM ERROR: Broken function found, compilation aborted!



This is currently a reduce case from a much larger project, so the IR may look
a little odd, but I can also work on providing an IR sample a little closer to
the original project if that helps!</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>