mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
7c9c6ed761
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
83 lines
2.0 KiB
LLVM
83 lines
2.0 KiB
LLVM
; RUN: llc -mtriple=arm-eabi -pre-RA-sched=source %s -o - \
|
|
; RUN: | FileCheck %s -check-prefix=EXPANDED
|
|
|
|
; RUN: llc -mtriple=armv6-apple-darwin -mcpu=cortex-a8 -mattr=-neon -arm-strict-align -pre-RA-sched=source %s -o - \
|
|
; RUN: | FileCheck %s -check-prefix=EXPANDED
|
|
|
|
; RUN: llc -mtriple=armv6-apple-darwin -mcpu=cortex-a8 %s -o - \
|
|
; RUN: | FileCheck %s -check-prefix=UNALIGNED
|
|
|
|
; rdar://7113725
|
|
; rdar://12091029
|
|
|
|
define void @t(i8* nocapture %a, i8* nocapture %b) nounwind {
|
|
entry:
|
|
; EXPANDED-LABEL: t:
|
|
; EXPANDED: ldrb [[R2:r[0-9]+]]
|
|
; EXPANDED: ldrb [[R3:r[0-9]+]]
|
|
; EXPANDED: ldrb [[R12:r[0-9]+]]
|
|
; EXPANDED: ldrb [[R1:r[0-9]+]]
|
|
; EXPANDED: strb [[R1]]
|
|
; EXPANDED: strb [[R12]]
|
|
; EXPANDED: strb [[R3]]
|
|
; EXPANDED: strb [[R2]]
|
|
|
|
; UNALIGNED-LABEL: t:
|
|
; UNALIGNED: ldr r1
|
|
; UNALIGNED: str r1
|
|
|
|
%__src1.i = bitcast i8* %b to i32* ; <i32*> [#uses=1]
|
|
%__dest2.i = bitcast i8* %a to i32* ; <i32*> [#uses=1]
|
|
%tmp.i = load i32, i32* %__src1.i, align 1 ; <i32> [#uses=1]
|
|
store i32 %tmp.i, i32* %__dest2.i, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @hword(double* %a, double* %b) nounwind {
|
|
entry:
|
|
; EXPANDED-LABEL: hword:
|
|
; EXPANDED-NOT: vld1
|
|
; EXPANDED: ldrh
|
|
; EXPANDED-NOT: str1
|
|
; EXPANDED: strh
|
|
|
|
; UNALIGNED-LABEL: hword:
|
|
; UNALIGNED: vld1.16
|
|
; UNALIGNED: vst1.16
|
|
%tmp = load double, double* %a, align 2
|
|
store double %tmp, double* %b, align 2
|
|
ret void
|
|
}
|
|
|
|
define void @byte(double* %a, double* %b) nounwind {
|
|
entry:
|
|
; EXPANDED-LABEL: byte:
|
|
; EXPANDED-NOT: vld1
|
|
; EXPANDED: ldrb
|
|
; EXPANDED-NOT: str1
|
|
; EXPANDED: strb
|
|
|
|
; UNALIGNED-LABEL: byte:
|
|
; UNALIGNED: vld1.8
|
|
; UNALIGNED: vst1.8
|
|
%tmp = load double, double* %a, align 1
|
|
store double %tmp, double* %b, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @byte_word_ops(i32* %a, i32* %b) nounwind {
|
|
entry:
|
|
; EXPANDED-LABEL: byte_word_ops:
|
|
; EXPANDED: ldrb
|
|
; EXPANDED: strb
|
|
|
|
; UNALIGNED-LABEL: byte_word_ops:
|
|
; UNALIGNED-NOT: ldrb
|
|
; UNALIGNED: ldr
|
|
; UNALIGNED-NOT: strb
|
|
; UNALIGNED: str
|
|
%tmp = load i32, i32* %a, align 1
|
|
store i32 %tmp, i32* %b, align 1
|
|
ret void
|
|
}
|