37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+zvfh -riscv-v-fixed-length-vector-lmul-max=1 < %s | FileCheck %s3; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=riscv64 -mattr=+f,+d < %s | FileCheck %s4 5define void @load(ptr %p) {6; CHECK-LABEL: 'load'7; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load [2 x i64], ptr %p, align 88; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = load [4 x i64], ptr %p, align 89; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %3 = load { i64, i64 }, ptr %p, align 810; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = load { i64, i32 }, ptr %p, align 811; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void12;13 load [2 x i64], ptr %p14 load [4 x i64], ptr %p15 load {i64,i64}, ptr %p16 load {i64,i32}, ptr %p17 18 ret void19}20 21define 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 824; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store [4 x i64] undef, ptr %p, align 825; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i64 } undef, ptr %p, align 826; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i32 } undef, ptr %p, align 827; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void28;29 store [2 x i64] undef, ptr %p30 store [4 x i64] undef, ptr %p31 store {i64,i64} undef, ptr %p32 store {i64,i32} undef, ptr %p33 34 ret void35}36 37