• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=aarch64 -mtriple=aarch64-linux-gnu | FileCheck %s
2
3define i32 @testsize1(i32 %x) minsize nounwind {
4entry:
5       %div = sdiv i32 %x, 32
6       ret i32 %div
7; CHECK-LABEL: testsize1
8; CHECK: sdiv
9}
10
11define i32 @testsize2(i32 %x) minsize nounwind {
12entry:
13       %div = sdiv i32 %x, 33
14       ret i32 %div
15; CHECK-LABEL: testsize2
16; CHECK: sdiv
17}
18
19define i32 @testsize3(i32 %x) minsize nounwind {
20entry:
21       %div = udiv i32 %x, 32
22       ret i32 %div
23; CHECK-LABEL: testsize3
24; CHECK: lsr
25}
26
27define i32 @testsize4(i32 %x) minsize nounwind {
28entry:
29       %div = udiv i32 %x, 33
30       ret i32 %div
31; CHECK-LABEL: testsize4
32; CHECK: udiv
33}
34
35define <8 x i16> @sdiv_vec8x16_minsize(<8 x i16> %var) minsize {
36entry:
37; CHECK: sdiv_vec8x16_minsize
38; CHECK: sshr 	v1.8h, v0.8h, #15
39; CHECK: usra	v0.8h, v1.8h, #11
40; CHECK: sshr	v0.8h, v0.8h, #5
41; CHECK: ret
42  %0 = sdiv <8 x i16> %var, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>
43  ret <8 x i16> %0
44}
45
46