[llvm-bugs] [Bug 25698] New: MSVC: Instruction does not dominate all uses

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 1 16:02:28 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25698

            Bug ID: 25698
           Summary: MSVC: Instruction does not dominate all uses
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151202/751edc25/attachment.html>


More information about the llvm-bugs mailing list