[ARM] Do not generate Tag_DIV_use=AllowDIVExt when hardware div is non-optional:...
[oota-llvm.git] / test / CodeGen / ARM / 2014-01-09-pseudo_expand_implicit_reg.ll
1 ; RUN: llc < %s -march=arm -mattr=+neon -print-before=post-RA-sched  > %t 2>&1 && FileCheck < %t %s
2
3 define void @vst(i8* %m, [4 x i64] %v) {
4 entry:
5 ; CHECK: vst:
6 ; CHECK: VST1d64Q %R{{[0-9]+}}<kill>, 8, %D{{[0-9]+}}, pred:14, pred:%noreg, %Q{{[0-9]+}}_Q{{[0-9]+}}<imp-use>
7
8   %v0 = extractvalue [4 x i64] %v, 0
9   %v1 = extractvalue [4 x i64] %v, 1
10   %v2 = extractvalue [4 x i64] %v, 2
11   %v3 = extractvalue [4 x i64] %v, 3
12
13   %t0 = bitcast i64 %v0 to <8 x i8>
14   %t1 = bitcast i64 %v1 to <8 x i8>
15   %t2 = bitcast i64 %v2 to <8 x i8>
16   %t3 = bitcast i64 %v3 to <8 x i8>
17
18   %s0 = bitcast <8 x i8> %t0 to <1 x i64>
19   %s1 = bitcast <8 x i8> %t1 to <1 x i64>
20   %s2 = bitcast <8 x i8> %t2 to <1 x i64>
21   %s3 = bitcast <8 x i8> %t3 to <1 x i64>
22
23   %tmp0 = bitcast <1 x i64> %s2 to i64
24   %tmp1 = bitcast <1 x i64> %s3 to i64
25
26   %n0 = insertelement <2 x i64> undef, i64 %tmp0, i32 0
27   %n1 = insertelement <2 x i64> %n0, i64 %tmp1, i32 1
28
29   call void @llvm.arm.neon.vst4.v1i64(i8* %m, <1 x i64> %s0, <1 x i64> %s1, <1 x i64> %s2, <1 x i64> %s3, i32 8)
30
31   call void @bar(<2 x i64> %n1)
32
33   ret void
34 }
35
36 %struct.__neon_int8x8x4_t = type { <8 x i8>,  <8 x i8>,  <8 x i8>, <8 x i8> }
37 define <8 x i8> @vtbx4(<8 x i8>* %A, %struct.__neon_int8x8x4_t* %B, <8 x i8>* %C) nounwind {
38 ; CHECK: vtbx4:
39 ; CHECK: VTBX4 {{.*}}, pred:14, pred:%noreg, %Q{{[0-9]+}}_Q{{[0-9]+}}<imp-use>
40         %tmp1 = load <8 x i8>* %A
41         %tmp2 = load %struct.__neon_int8x8x4_t* %B
42         %tmp3 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 0
43         %tmp4 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 1
44         %tmp5 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 2
45         %tmp6 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 3
46         %tmp7 = load <8 x i8>* %C
47         %tmp8 = call <8 x i8> @llvm.arm.neon.vtbx4(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5, <8 x i8> %tmp6, <8 x i8> %tmp7)
48   call void @bar2(%struct.__neon_int8x8x4_t %tmp2, <8 x i8> %tmp8)
49         ret <8 x i8> %tmp8
50 }
51
52 declare void @llvm.arm.neon.vst4.v1i64(i8*, <1 x i64>, <1 x i64>, <1 x i64>, <1 x i64>, i32)
53 declare <8 x i8>  @llvm.arm.neon.vtbx4(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
54 declare void @bar2(%struct.__neon_int8x8x4_t, <8 x i8>)
55 declare void @bar(<2 x i64> %arg)