1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt -cost-model -analyze -mtriple aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 define void @test_urem_srem_expand() {
5 ; CHECK-LABEL: 'test_urem_srem_expand'
6 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_urem_0 = urem <vscale x 16 x i8> undef, undef
7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_urem_1 = urem <vscale x 8 x i16> undef, undef
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_urem_2 = urem <vscale x 4 x i32> undef, undef
9 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_urem_3 = urem <vscale x 2 x i64> undef, undef
10 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_srem_0 = srem <vscale x 16 x i8> undef, undef
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_srem_1 = srem <vscale x 8 x i16> undef, undef
12 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_srem_2 = srem <vscale x 4 x i32> undef, undef
13 ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_srem_3 = srem <vscale x 2 x i64> undef, undef
14 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_urem_0 = urem <vscale x 32 x i8> undef, undef
15 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_urem_1 = urem <vscale x 16 x i16> undef, undef
16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_urem_2 = urem <vscale x 8 x i32> undef, undef
17 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_urem_3 = urem <vscale x 4 x i64> undef, undef
18 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_srem_0 = srem <vscale x 32 x i8> undef, undef
19 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_srem_1 = srem <vscale x 16 x i16> undef, undef
20 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_srem_2 = srem <vscale x 8 x i32> undef, undef
21 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %split_type_srem_3 = srem <vscale x 4 x i64> undef, undef
22 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_urem_0 = urem <vscale x 31 x i8> undef, undef
23 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_urem_1 = urem <vscale x 15 x i16> undef, undef
24 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_urem_2 = urem <vscale x 7 x i32> undef, undef
25 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_urem_3 = urem <vscale x 3 x i64> undef, undef
26 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_srem_0 = srem <vscale x 31 x i8> undef, undef
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_srem_1 = srem <vscale x 15 x i16> undef, undef
28 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_srem_2 = srem <vscale x 7 x i32> undef, undef
29 ; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %widen_type_srem_3 = srem <vscale x 3 x i64> undef, undef
30 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
33 %legal_type_urem_0 = urem <vscale x 16 x i8> undef, undef
34 %legal_type_urem_1 = urem <vscale x 8 x i16> undef, undef
35 %legal_type_urem_2 = urem <vscale x 4 x i32> undef, undef
36 %legal_type_urem_3 = urem <vscale x 2 x i64> undef, undef
37 %legal_type_srem_0 = srem <vscale x 16 x i8> undef, undef
38 %legal_type_srem_1 = srem <vscale x 8 x i16> undef, undef
39 %legal_type_srem_2 = srem <vscale x 4 x i32> undef, undef
40 %legal_type_srem_3 = srem <vscale x 2 x i64> undef, undef
42 %split_type_urem_0 = urem <vscale x 32 x i8> undef, undef
43 %split_type_urem_1 = urem <vscale x 16 x i16> undef, undef
44 %split_type_urem_2 = urem <vscale x 8 x i32> undef, undef
45 %split_type_urem_3 = urem <vscale x 4 x i64> undef, undef
46 %split_type_srem_0 = srem <vscale x 32 x i8> undef, undef
47 %split_type_srem_1 = srem <vscale x 16 x i16> undef, undef
48 %split_type_srem_2 = srem <vscale x 8 x i32> undef, undef
49 %split_type_srem_3 = srem <vscale x 4 x i64> undef, undef
51 %widen_type_urem_0 = urem <vscale x 31 x i8> undef, undef
52 %widen_type_urem_1 = urem <vscale x 15 x i16> undef, undef
53 %widen_type_urem_2 = urem <vscale x 7 x i32> undef, undef
54 %widen_type_urem_3 = urem <vscale x 3 x i64> undef, undef
55 %widen_type_srem_0 = srem <vscale x 31 x i8> undef, undef
56 %widen_type_srem_1 = srem <vscale x 15 x i16> undef, undef
57 %widen_type_srem_2 = srem <vscale x 7 x i32> undef, undef
58 %widen_type_srem_3 = srem <vscale x 3 x i64> undef, undef