; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mcpu=sifive-x390 < %s | FileCheck %s --check-prefix=CHECK ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mcpu=sifive-p670 < %s | FileCheck %s --check-prefix=CHECK_FUSION ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mcpu=sifive-x390 -cost-kind=code-size < %s | FileCheck %s --check-prefix=SIZE ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mcpu=sifive-p670 -cost-kind=code-size < %s | FileCheck %s --check-prefix=SIZE_FUSION ; Storing an immediate vector implicity calls RISCVTTIImpl::getConstantPoolLoadCost() define void @rvv_store_imm(ptr %X) { ; CHECK-LABEL: 'rvv_store_imm' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i8> , ptr %X, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i8> , ptr %X, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i8> , ptr %X, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK_FUSION-LABEL: 'rvv_store_imm' ; CHECK_FUSION-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <2 x i8> , ptr %X, align 2 ; CHECK_FUSION-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <4 x i8> , ptr %X, align 4 ; CHECK_FUSION-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <8 x i8> , ptr %X, align 8 ; CHECK_FUSION-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SIZE-LABEL: 'rvv_store_imm' ; SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i8> , ptr %X, align 2 ; SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i8> , ptr %X, align 4 ; SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i8> , ptr %X, align 8 ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; SIZE_FUSION-LABEL: 'rvv_store_imm' ; SIZE_FUSION-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i8> , ptr %X, align 2 ; SIZE_FUSION-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i8> , ptr %X, align 4 ; SIZE_FUSION-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i8> , ptr %X, align 8 ; SIZE_FUSION-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; store <2 x i8> , ptr %X store <4 x i8> , ptr %X store <8 x i8> , ptr %X ret void }