mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			28 lines
		
	
	
		
			586 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			586 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: opt < %s -tailduplicate -taildup-threshold=2 -S | grep add | not grep uses=1
 | |
| 
 | |
| define i32 @test1(i1 %C, i32 %A, i32* %P) {
 | |
| entry:
 | |
| 	br i1 %C, label %L1, label %L2
 | |
| L1:		; preds = %entry
 | |
| 	store i32 1, i32* %P
 | |
| 	br label %L2
 | |
| L2:		; preds = %L1, %entry
 | |
| 	%X = add i32 %A, 17		; <i32> [#uses=1]
 | |
| 	ret i32 %X
 | |
| }
 | |
| 
 | |
| define i32 @test2(i1 %C, i32 %A, i32* %P) {
 | |
| entry:
 | |
| 	br i1 %C, label %L1, label %L2
 | |
| L1:		; preds = %entry
 | |
| 	store i32 1, i32* %P
 | |
| 	br label %L3
 | |
| L2:		; preds = %entry
 | |
| 	store i32 7, i32* %P
 | |
| 	br label %L3
 | |
| L3:		; preds = %L2, %L1
 | |
| 	%X = add i32 %A, 17		; <i32> [#uses=1]
 | |
| 	ret i32 %X
 | |
| }
 | |
| 
 |