; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -passes="print" 2>&1 -disable-output -mtriple=riscv32 -mattr=+experimental-p | FileCheck %s --check-prefix=RV32P ; RUN: opt < %s -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mattr=+experimental-p | FileCheck %s --check-prefix=RV64P ; Verify that querying shuffle costs with P-extension (without V) does not crash. define void @reverse_v4i8() { ; RV32P-LABEL: 'reverse_v4i8' ; RV32P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = shufflevector <4 x i8> poison, <4 x i8> poison, <4 x i32> ; RV32P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64P-LABEL: 'reverse_v4i8' ; RV64P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8 = shufflevector <4 x i8> poison, <4 x i8> poison, <4 x i32> ; RV64P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v4i8 = shufflevector <4 x i8> poison, <4 x i8> poison, <4 x i32> ret void } define void @reverse_v8i8() { ; RV32P-LABEL: 'reverse_v8i8' ; RV32P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = shufflevector <8 x i8> poison, <8 x i8> poison, <8 x i32> ; RV32P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64P-LABEL: 'reverse_v8i8' ; RV64P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8 = shufflevector <8 x i8> poison, <8 x i8> poison, <8 x i32> ; RV64P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v8i8 = shufflevector <8 x i8> poison, <8 x i8> poison, <8 x i32> ret void } define void @reverse_v2i16() { ; RV32P-LABEL: 'reverse_v2i16' ; RV32P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = shufflevector <2 x i16> poison, <2 x i16> poison, <2 x i32> ; RV32P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64P-LABEL: 'reverse_v2i16' ; RV64P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16 = shufflevector <2 x i16> poison, <2 x i16> poison, <2 x i32> ; RV64P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i16 = shufflevector <2 x i16> poison, <2 x i16> poison, <2 x i32> ret void } define void @reverse_v4i16() { ; RV32P-LABEL: 'reverse_v4i16' ; RV32P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = shufflevector <4 x i16> poison, <4 x i16> poison, <4 x i32> ; RV32P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64P-LABEL: 'reverse_v4i16' ; RV64P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16 = shufflevector <4 x i16> poison, <4 x i16> poison, <4 x i32> ; RV64P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v4i16 = shufflevector <4 x i16> poison, <4 x i16> poison, <4 x i32> ret void } define void @reverse_v2i32() { ; RV32P-LABEL: 'reverse_v2i32' ; RV32P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = shufflevector <2 x i32> poison, <2 x i32> poison, <2 x i32> ; RV32P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64P-LABEL: 'reverse_v2i32' ; RV64P-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32 = shufflevector <2 x i32> poison, <2 x i32> poison, <2 x i32> ; RV64P-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %v2i32 = shufflevector <2 x i32> poison, <2 x i32> poison, <2 x i32> ret void }