1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfh -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=1 < %s | FileCheck %s
3 ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+f,+d < %s | FileCheck %s
5 define void @load(ptr %p) {
7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load [2 x i64], ptr %p, align 8
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = load [4 x i64], ptr %p, align 8
9 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %3 = load { i64, i64 }, ptr %p, align 8
10 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = load { i64, i32 }, ptr %p, align 8
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
13 load [2 x i64], ptr %p
14 load [4 x i64], ptr %p
15 load {i64,i64}, ptr %p
16 load {i64,i32}, ptr %p
21 define void @store(ptr %p) {
22 ; CHECK-LABEL: 'store'
23 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store [2 x i64] undef, ptr %p, align 8
24 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store [4 x i64] undef, ptr %p, align 8
25 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i64 } undef, ptr %p, align 8
26 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i32 } undef, ptr %p, align 8
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
29 store [2 x i64] undef, ptr %p
30 store [4 x i64] undef, ptr %p
31 store {i64,i64} undef, ptr %p
32 store {i64,i32} undef, ptr %p