mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Fixes PR22462: two of the tests have regressed for a while, but were using CHECK-NOT to match "May:". The actual output was changed to "MayAlias:" at some point, which made the tests useless. Two others return MayAlias only because of a lack of analysis; BasicAA returns PartialAlias in those cases, when a datalayout is present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228346 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			32 lines
		
	
	
		
			845 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			845 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s
 | |
| ; PR4267
 | |
| 
 | |
| target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 | |
| 
 | |
| ; CHECK: PartialAlias: double* %p.0.i.0, double* %p3
 | |
| 
 | |
| ; %p3 is equal to %p.0.i.0 on the second iteration of the loop,
 | |
| ; so MayAlias is needed.  In practice, basicaa returns PartialAlias
 | |
| ; for GEPs to ignore TBAA.
 | |
| 
 | |
| define void @foo([3 x [3 x double]]* noalias %p) {
 | |
| entry:
 | |
|   %p3 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
 | |
|   br label %loop
 | |
| 
 | |
| loop:
 | |
|   %i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
 | |
| 
 | |
|   %p.0.i.0 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
 | |
| 
 | |
|   store volatile double 0.0, double* %p3
 | |
|   store volatile double 0.1, double* %p.0.i.0
 | |
| 
 | |
|   %i.next = add i64 %i, 1
 | |
|   %cmp = icmp slt i64 %i.next, 3
 | |
|   br i1 %cmp, label %loop, label %exit
 | |
| 
 | |
| exit:
 | |
|   ret void
 | |
| }
 |