2012-08-15 17:44:53 +00:00
|
|
|
; RUN: llc < %s -march=arm -pre-RA-sched=source | FileCheck %s -check-prefix=EXPANDED
|
2012-09-18 01:42:45 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv6-apple-darwin -mcpu=cortex-a8 -mattr=-neon -arm-strict-align -pre-RA-sched=source | FileCheck %s -check-prefix=EXPANDED
|
2012-08-15 17:44:53 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv6-apple-darwin -mcpu=cortex-a8 | FileCheck %s -check-prefix=UNALIGNED
|
2007-08-01 19:34:21 +00:00
|
|
|
|
2009-08-15 21:21:19 +00:00
|
|
|
; rdar://7113725
|
2012-08-15 17:44:53 +00:00
|
|
|
; rdar://12091029
|
2007-08-01 19:34:21 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define void @t(i8* nocapture %a, i8* nocapture %b) nounwind {
|
2009-08-15 21:14:01 +00:00
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; EXPANDED-LABEL: t:
|
2012-08-15 17:44:53 +00:00
|
|
|
; 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]]
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; UNALIGNED-LABEL: t:
|
2012-08-15 17:44:53 +00:00
|
|
|
; UNALIGNED: ldr r1
|
|
|
|
; UNALIGNED: str r1
|
2009-08-15 21:21:19 +00:00
|
|
|
|
|
|
|
%__src1.i = bitcast i8* %b to i32* ; <i32*> [#uses=1]
|
|
|
|
%__dest2.i = bitcast i8* %a to i32* ; <i32*> [#uses=1]
|
|
|
|
%tmp.i = load i32* %__src1.i, align 1 ; <i32> [#uses=1]
|
|
|
|
store i32 %tmp.i, i32* %__dest2.i, align 1
|
|
|
|
ret void
|
2007-08-01 19:34:21 +00:00
|
|
|
}
|
2012-08-15 17:44:53 +00:00
|
|
|
|
|
|
|
define void @hword(double* %a, double* %b) nounwind {
|
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; EXPANDED-LABEL: hword:
|
2012-08-15 17:44:53 +00:00
|
|
|
; EXPANDED-NOT: vld1
|
|
|
|
; EXPANDED: ldrh
|
|
|
|
; EXPANDED-NOT: str1
|
|
|
|
; EXPANDED: strh
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; UNALIGNED-LABEL: hword:
|
2012-08-15 17:44:53 +00:00
|
|
|
; UNALIGNED: vld1.16
|
|
|
|
; UNALIGNED: vst1.16
|
|
|
|
%tmp = load double* %a, align 2
|
|
|
|
store double %tmp, double* %b, align 2
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @byte(double* %a, double* %b) nounwind {
|
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; EXPANDED-LABEL: byte:
|
2012-08-15 17:44:53 +00:00
|
|
|
; EXPANDED-NOT: vld1
|
|
|
|
; EXPANDED: ldrb
|
|
|
|
; EXPANDED-NOT: str1
|
|
|
|
; EXPANDED: strb
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; UNALIGNED-LABEL: byte:
|
2012-08-15 17:44:53 +00:00
|
|
|
; UNALIGNED: vld1.8
|
|
|
|
; UNALIGNED: vst1.8
|
|
|
|
%tmp = load double* %a, align 1
|
|
|
|
store double %tmp, double* %b, align 1
|
|
|
|
ret void
|
|
|
|
}
|
2012-09-18 01:42:45 +00:00
|
|
|
|
|
|
|
define void @byte_word_ops(i32* %a, i32* %b) nounwind {
|
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; EXPANDED-LABEL: byte_word_ops:
|
2012-09-18 01:42:45 +00:00
|
|
|
; EXPANDED: ldrb
|
|
|
|
; EXPANDED: strb
|
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; UNALIGNED-LABEL: byte_word_ops:
|
2012-09-18 01:42:45 +00:00
|
|
|
; UNALIGNED-NOT: ldrb
|
|
|
|
; UNALIGNED: ldr
|
|
|
|
; UNALIGNED-NOT: strb
|
|
|
|
; UNALIGNED: str
|
|
|
|
%tmp = load i32* %a, align 1
|
|
|
|
store i32 %tmp, i32* %b, align 1
|
|
|
|
ret void
|
|
|
|
}
|