mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	where a loop's header is being split and it has predecessors which are not contained by the most-nested loop which contains the loop. This fixes PR5235. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84505 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			21 lines
		
	
	
		
			620 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			620 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
; RUN: opt -S -loopsimplify -disable-output -verify-loop-info -verify-dom-info < %s
 | 
						|
; PR5235
 | 
						|
 | 
						|
; When loopsimplify inserts a preheader for this loop, it should add the new
 | 
						|
; block to the enclosing loop and not get confused by the unreachable
 | 
						|
; bogus loop entry.
 | 
						|
 | 
						|
define void @is_extract_cab() nounwind {
 | 
						|
entry:
 | 
						|
  br label %header
 | 
						|
 | 
						|
header:                                       ; preds = %if.end206, %cond.end66, %if.end23
 | 
						|
  br label %while.body115
 | 
						|
 | 
						|
while.body115:                                    ; preds = %9, %if.end192, %if.end101
 | 
						|
  br i1 undef, label %header, label %while.body115
 | 
						|
 | 
						|
foo:
 | 
						|
  br label %while.body115
 | 
						|
}
 |