mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	For little-endian, the function would convert (extract_vector_elt (load X), Y) to X + Y*sizeof(elt). For big-endian it would instead use X + sizeof(vec) - Y*sizeof(elt). The big-endian case wasn't right since vector index order always follows memory/array order, even for big-endian. (Note that the current handling has to be wrong for Y==0 since it would access beyond the end of the vector.) Original patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236529 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			14 lines
		
	
	
		
			411 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			411 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
; Verify ReplaceExtractVectorEltOfLoadWithNarrowedLoad fixes
 | 
						|
;
 | 
						|
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
 | 
						|
 | 
						|
; Test a memory copy of a v2i32 (via the constant pool).
 | 
						|
define void @f1(<2 x i32> *%dest) {
 | 
						|
; CHECK-LABEL: f1:
 | 
						|
; CHECK: lgrl [[REG:%r[0-5]]], {{[._A-Za-z0-9]}}
 | 
						|
; CHECK: stg [[REG]], 0(%r2)
 | 
						|
; CHECK: br %r14
 | 
						|
  store <2 x i32> <i32 1000000, i32 99999>, <2 x i32> *%dest
 | 
						|
  ret void
 | 
						|
}
 |