1 ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu < %s | FileCheck %s
3 ; Verify the cost of integer division instructions.
5 define i32 @sdivs1i32(i32 %a, i32 %b) {
6 ; CHECK-LABEL: 'Cost Model Analysis' for function 'sdivs1i32':
7 ; CHECK: Found an estimated cost of 1 for instruction: %c = sdiv i32 %a, %b
12 define i64 @sdivs1i64(i64 %a, i64 %b) {
13 ; CHECK-LABEL: 'Cost Model Analysis' for function 'sdivs1i64':
14 ; CHECK: Found an estimated cost of 1 for instruction: %c = sdiv i64 %a, %b
19 define <2 x i32> @sdivv2i32(<2 x i32> %a, <2 x i32> %b) {
20 ; CHECK-LABEL: 'Cost Model Analysis' for function 'sdivv2i32':
21 ; CHECK: Found an estimated cost of 24 for instruction: %c = sdiv <2 x i32> %a, %b
22 %c = sdiv <2 x i32> %a, %b
26 define <2 x i64> @sdivv2i64(<2 x i64> %a, <2 x i64> %b) {
27 ; CHECK-LABEL: 'Cost Model Analysis' for function 'sdivv2i64':
28 ; CHECK: Found an estimated cost of 24 for instruction: %c = sdiv <2 x i64> %a, %b
29 %c = sdiv <2 x i64> %a, %b
33 define <4 x i32> @sdivv4i32(<4 x i32> %a, <4 x i32> %b) {
34 ; CHECK-LABEL: 'Cost Model Analysis' for function 'sdivv4i32':
35 ; CHECK: Found an estimated cost of 52 for instruction: %c = sdiv <4 x i32> %a, %b
36 %c = sdiv <4 x i32> %a, %b