2014-04-04 00:01:44 +08:00
|
|
|
; RUN: llc -mtriple=arm-eabi -float-abi=soft -mattr=+neon,+v6t2 -no-integrated-as %s -o - \
|
|
|
|
; RUN: | FileCheck %s
|
2009-12-09 07:06:22 +08:00
|
|
|
|
2009-12-18 09:03:29 +08:00
|
|
|
; Radar 7449043
|
2009-12-09 07:06:22 +08:00
|
|
|
%struct.int32x4_t = type { <4 x i32> }
|
|
|
|
|
2010-06-17 23:18:27 +08:00
|
|
|
define void @t() nounwind {
|
2009-12-09 07:06:22 +08:00
|
|
|
entry:
|
|
|
|
; CHECK: vmov.I64 q15, #0
|
2011-04-19 08:14:43 +08:00
|
|
|
; CHECK: vmov.32 d30[0],
|
2010-10-08 14:15:13 +08:00
|
|
|
; CHECK: vmov q8, q15
|
2009-12-09 07:06:22 +08:00
|
|
|
%tmp = alloca %struct.int32x4_t, align 16
|
|
|
|
call void asm sideeffect "vmov.I64 q15, #0\0Avmov.32 d30[0], $1\0Avmov ${0:q}, q15\0A", "=*w,r,~{d31},~{d30}"(%struct.int32x4_t* %tmp, i32 8192) nounwind
|
|
|
|
ret void
|
|
|
|
}
|
2009-12-18 09:03:29 +08:00
|
|
|
|
|
|
|
; Radar 7457110
|
|
|
|
%struct.int32x2_t = type { <4 x i32> }
|
|
|
|
|
2010-06-17 23:18:27 +08:00
|
|
|
define void @t2() nounwind {
|
2009-12-18 09:03:29 +08:00
|
|
|
entry:
|
2010-10-08 14:15:13 +08:00
|
|
|
; CHECK: vmov d30, d16
|
2009-12-18 09:03:29 +08:00
|
|
|
; CHECK: vmov.32 r0, d30[0]
|
|
|
|
%asmtmp2 = tail call i32 asm sideeffect "vmov d30, $1\0Avmov.32 $0, d30[0]\0A", "=r,w,~{d30}"(<2 x i32> undef) nounwind
|
|
|
|
ret void
|
|
|
|
}
|
2011-06-02 03:55:10 +08:00
|
|
|
|
|
|
|
; Radar 9306086
|
|
|
|
|
|
|
|
%0 = type { <8 x i8>, <16 x i8>* }
|
|
|
|
|
|
|
|
define hidden void @conv4_8_E() nounwind {
|
|
|
|
entry:
|
2013-02-14 22:46:12 +08:00
|
|
|
%asmtmp31 = call %0 asm "vld1.u8 {$0}, [$1:128]!\0A", "=w,=r,1"(<16 x i8>* undef) nounwind
|
2011-06-02 03:55:10 +08:00
|
|
|
unreachable
|
|
|
|
}
|
2011-06-04 01:24:37 +08:00
|
|
|
|
|
|
|
; Radar 9037836 & 9119939
|
|
|
|
|
|
|
|
define i32 @t3() nounwind {
|
|
|
|
entry:
|
|
|
|
tail call void asm sideeffect "flds s15, $0 \0A", "^Uv|m,~{s15}"(float 1.000000e+00) nounwind
|
|
|
|
ret i32 0
|
|
|
|
}
|
2011-06-04 04:44:52 +08:00
|
|
|
|
|
|
|
; Radar 9037836 & 9119939
|
|
|
|
|
|
|
|
@k.2126 = internal unnamed_addr global float 1.000000e+00
|
|
|
|
define i32 @t4() nounwind {
|
|
|
|
entry:
|
|
|
|
call void asm sideeffect "flds s15, $0 \0A", "*^Uv,~{s15}"(float* @k.2126) nounwind
|
|
|
|
ret i32 0
|
|
|
|
}
|
2011-06-04 06:09:12 +08:00
|
|
|
|
|
|
|
; Radar 9037836 & 9119939
|
|
|
|
|
|
|
|
define i32 @t5() nounwind {
|
|
|
|
entry:
|
|
|
|
call void asm sideeffect "flds s15, $0 \0A", "*^Uvm,~{s15}"(float* @k.2126) nounwind
|
|
|
|
ret i32 0
|
|
|
|
}
|
2011-07-01 08:14:47 +08:00
|
|
|
|
|
|
|
; Radar 9307836 & 9119939
|
|
|
|
|
|
|
|
define float @t6(float %y) nounwind {
|
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t6
|
2011-07-01 08:14:47 +08:00
|
|
|
; CHECK: flds s15, s0
|
|
|
|
%0 = tail call float asm "flds s15, $0", "=x"() nounwind
|
|
|
|
ret float %0
|
|
|
|
}
|
2011-07-01 08:30:46 +08:00
|
|
|
|
|
|
|
; Radar 9307836 & 9119939
|
|
|
|
|
2011-07-01 09:00:07 +08:00
|
|
|
define double @t7(double %y) nounwind {
|
2011-07-01 08:30:46 +08:00
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t7
|
2011-07-01 08:30:46 +08:00
|
|
|
; CHECK: flds s15, d0
|
|
|
|
%0 = tail call double asm "flds s15, $0", "=x"() nounwind
|
|
|
|
ret double %0
|
|
|
|
}
|
|
|
|
|
|
|
|
; Radar 9307836 & 9119939
|
|
|
|
|
2011-07-01 09:00:07 +08:00
|
|
|
define float @t8(float %y) nounwind {
|
2011-07-01 08:30:46 +08:00
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t8
|
2011-07-01 08:30:46 +08:00
|
|
|
; CHECK: flds s15, s0
|
|
|
|
%0 = tail call float asm "flds s15, $0", "=t"() nounwind
|
|
|
|
ret float %0
|
|
|
|
}
|
2011-07-01 09:00:07 +08:00
|
|
|
|
|
|
|
; Radar 9307836 & 9119939
|
|
|
|
|
|
|
|
define i32 @t9(i32 %r0) nounwind {
|
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t9
|
2011-07-01 09:00:07 +08:00
|
|
|
; CHECK: movw r0, #27182
|
|
|
|
%0 = tail call i32 asm "movw $0, $1", "=r,j"(i32 27182) nounwind
|
|
|
|
ret i32 %0
|
|
|
|
}
|
2011-07-30 05:18:58 +08:00
|
|
|
|
|
|
|
; Radar 9866494
|
|
|
|
|
|
|
|
define void @t10(i8* %f, i32 %g) nounwind {
|
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t10
|
2011-07-30 05:18:58 +08:00
|
|
|
; CHECK: str r1, [r0]
|
|
|
|
%f.addr = alloca i8*, align 4
|
|
|
|
store i8* %f, i8** %f.addr, align 4
|
|
|
|
call void asm "str $1, $0", "=*Q,r"(i8** %f.addr, i32 %g) nounwind
|
|
|
|
ret void
|
|
|
|
}
|
2011-12-13 05:45:15 +08:00
|
|
|
|
|
|
|
; Radar 10551006
|
|
|
|
|
|
|
|
define <4 x i32> @t11(i32* %p) nounwind {
|
|
|
|
entry:
|
2016-07-19 03:43:58 +08:00
|
|
|
; CHECK: t11
|
2011-12-13 05:45:15 +08:00
|
|
|
; CHECK: vld1.s32 {d16[], d17[]}, [r0]
|
|
|
|
%0 = tail call <4 x i32> asm "vld1.s32 {${0:e}[], ${0:f}[]}, [$1]", "=w,r"(i32* %p) nounwind
|
|
|
|
ret <4 x i32> %0
|
|
|
|
}
|
2016-07-20 17:48:24 +08:00
|
|
|
|
|
|
|
; Bugzilla PR26038
|
|
|
|
|
|
|
|
define i32 @fn1() local_unnamed_addr nounwind {
|
|
|
|
; CHECK-LABEL: fn1
|
|
|
|
entry:
|
|
|
|
; CHECK: mov [[addr:r[0-9]+]], #5
|
|
|
|
; CHECK: ldrh {{.*}}[[addr]]
|
|
|
|
%0 = tail call i32 asm "ldrh $0, $1", "=r,*Q"(i8* inttoptr (i32 5 to i8*)) nounwind
|
|
|
|
ret i32 %0
|
|
|
|
}
|