; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv32 -mattr=+zve32f,+zvl128b < %s | FileCheck %s --check-prefixes=RV32 ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=riscv64 -mattr=+zve32f,+zvl128b < %s | FileCheck %s --check-prefixes=RV64 define void @masked_gather() { ; RV32-LABEL: 'masked_gather' ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Invalid cost for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0( align 8 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0( align 4 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0( align 2 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0( align 1 undef, undef, undef) ; RV32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; RV64-LABEL: 'masked_gather' ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0( align 8 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0( align 4 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0( align 2 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Invalid cost for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0( align 1 undef, undef, undef) ; RV64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0( undef, i32 8, undef, undef) %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0( undef, i32 8, undef, undef) %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0( undef, i32 8, undef, undef) %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0( undef, i32 8, undef, undef) %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0( undef, i32 4, undef, undef) %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0( undef, i32 4, undef, undef) %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0( undef, i32 4, undef, undef) %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0( undef, i32 4, undef, undef) %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0( undef, i32 4, undef, undef) %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0( undef, i32 8, undef, undef) %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0( undef, i32 8, undef, undef) %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0( undef, i32 8, undef, undef) %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0( undef, i32 8, undef, undef) %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0( undef, i32 4, undef, undef) %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0( undef, i32 4, undef, undef) %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0( undef, i32 4, undef, undef) %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0( undef, i32 4, undef, undef) %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0( undef, i32 4, undef, undef) %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0( undef, i32 2, undef, undef) %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0( undef, i32 2, undef, undef) %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0( undef, i32 2, undef, undef) %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0( undef, i32 2, undef, undef) %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0( undef, i32 2, undef, undef) %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0( undef, i32 2, undef, undef) %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0( undef, i32 1, undef, undef) %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0( undef, i32 1, undef, undef) %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0( undef, i32 1, undef, undef) %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0( undef, i32 1, undef, undef) %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0( undef, i32 1, undef, undef) %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0( undef, i32 1, undef, undef) %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0( undef, i32 1, undef, undef) ret void }