; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -passes="print" 2>&1 -disable-output -S -mtriple=riscv64 -mattr=+v -riscv-v-vector-bits-min=-1 | FileCheck %s define void @smax() { ; CHECK-LABEL: 'smax' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call i8 @llvm.smax.i8(i8 undef, i8 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x i8> @llvm.smax.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x i8> @llvm.smax.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x i8> @llvm.smax.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x i8> @llvm.smax.v16i8(<16 x i8> undef, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.smax.nxv1i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.smax.nxv2i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.smax.nxv4i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.smax.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.smax.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call i16 @llvm.smax.i16(i16 undef, i16 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <2 x i16> @llvm.smax.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = call <4 x i16> @llvm.smax.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = call <8 x i16> @llvm.smax.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call <16 x i16> @llvm.smax.v16i16(<16 x i16> undef, <16 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.smax.nxv1i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.smax.nxv2i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.smax.nxv4i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.smax.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call @llvm.smax.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %21 = call i32 @llvm.smax.i32(i32 undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call <2 x i32> @llvm.smax.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = call <8 x i32> @llvm.smax.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call <16 x i32> @llvm.smax.v16i32(<16 x i32> undef, <16 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.smax.nxv1i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.smax.nxv2i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.smax.nxv4i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = call @llvm.smax.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = call @llvm.smax.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = call i64 @llvm.smax.i64(i64 undef, i64 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %32 = call <2 x i64> @llvm.smax.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call <4 x i64> @llvm.smax.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call <8 x i64> @llvm.smax.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call <16 x i64> @llvm.smax.v16i64(<16 x i64> undef, <16 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = call @llvm.smax.nxv1i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.smax.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.smax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.smax.nxv8i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.smax.i8(i8 undef, i8 undef) call <2 x i8> @llvm.smax.v2i8(<2 x i8> undef, <2 x i8> undef) call <4 x i8> @llvm.smax.v4i8(<4 x i8> undef, <4 x i8> undef) call <8 x i8> @llvm.smax.v8i8(<8 x i8> undef, <8 x i8> undef) call <16 x i8> @llvm.smax.v16i8(<16 x i8> undef, <16 x i8> undef) call @llvm.smax.nvx1i8( undef, undef) call @llvm.smax.nvx2i8( undef, undef) call @llvm.smax.nvx4i8( undef, undef) call @llvm.smax.nvx8i8( undef, undef) call @llvm.smax.nvx16i8( undef, undef) call i16 @llvm.smax.i16(i16 undef, i16 undef) call <2 x i16> @llvm.smax.v2i16(<2 x i16> undef, <2 x i16> undef) call <4 x i16> @llvm.smax.v4i16(<4 x i16> undef, <4 x i16> undef) call <8 x i16> @llvm.smax.v8i16(<8 x i16> undef, <8 x i16> undef) call <16 x i16> @llvm.smax.v16i16(<16 x i16> undef, <16 x i16> undef) call @llvm.smax.nvx1i16( undef, undef) call @llvm.smax.nvx2i16( undef, undef) call @llvm.smax.nvx4i16( undef, undef) call @llvm.smax.nvx8i16( undef, undef) call @llvm.smax.nvx16i16( undef, undef) call i32 @llvm.smax.i32(i32 undef, i32 undef) call <2 x i32> @llvm.smax.v2i32(<2 x i32> undef, <2 x i32> undef) call <4 x i32> @llvm.smax.v4i32(<4 x i32> undef, <4 x i32> undef) call <8 x i32> @llvm.smax.v8i32(<8 x i32> undef, <8 x i32> undef) call <16 x i32> @llvm.smax.v16i32(<16 x i32> undef, <16 x i32> undef) call @llvm.smax.nvx1i32( undef, undef) call @llvm.smax.nvx2i32( undef, undef) call @llvm.smax.nvx4i32( undef, undef) call @llvm.smax.nvx8i32( undef, undef) call @llvm.smax.nvx16i32( undef, undef) call i64 @llvm.smax.i64(i64 undef, i64 undef) call <2 x i64> @llvm.smax.v2i64(<2 x i64> undef, <2 x i64> undef) call <4 x i64> @llvm.smax.v4i64(<4 x i64> undef, <4 x i64> undef) call <8 x i64> @llvm.smax.v8i64(<8 x i64> undef, <8 x i64> undef) call <16 x i64> @llvm.smax.v16i64(<16 x i64> undef, <16 x i64> undef) call @llvm.smax.nvx1i64( undef, undef) call @llvm.smax.nvx2i64( undef, undef) call @llvm.smax.nvx4i64( undef, undef) call @llvm.smax.nvx8i64( undef, undef) ret void } define void @smin() { ; CHECK-LABEL: 'smin' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call i8 @llvm.smin.i8(i8 undef, i8 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x i8> @llvm.smin.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x i8> @llvm.smin.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x i8> @llvm.smin.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x i8> @llvm.smin.v16i8(<16 x i8> undef, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.smin.nxv1i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.smin.nxv2i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.smin.nxv4i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.smin.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.smin.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call i16 @llvm.smin.i16(i16 undef, i16 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <2 x i16> @llvm.smin.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = call <4 x i16> @llvm.smin.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = call <8 x i16> @llvm.smin.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call <16 x i16> @llvm.smin.v16i16(<16 x i16> undef, <16 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.smin.nxv1i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.smin.nxv2i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.smin.nxv4i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.smin.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call @llvm.smin.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %21 = call i32 @llvm.smin.i32(i32 undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call <2 x i32> @llvm.smin.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = call <8 x i32> @llvm.smin.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call <16 x i32> @llvm.smin.v16i32(<16 x i32> undef, <16 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.smin.nxv1i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.smin.nxv2i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.smin.nxv4i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = call @llvm.smin.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = call @llvm.smin.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = call i64 @llvm.smin.i64(i64 undef, i64 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %32 = call <2 x i64> @llvm.smin.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call <4 x i64> @llvm.smin.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call <8 x i64> @llvm.smin.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call <16 x i64> @llvm.smin.v16i64(<16 x i64> undef, <16 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = call @llvm.smin.nxv1i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.smin.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.smin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.smin.nxv8i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.smin.i8(i8 undef, i8 undef) call <2 x i8> @llvm.smin.v2i8(<2 x i8> undef, <2 x i8> undef) call <4 x i8> @llvm.smin.v4i8(<4 x i8> undef, <4 x i8> undef) call <8 x i8> @llvm.smin.v8i8(<8 x i8> undef, <8 x i8> undef) call <16 x i8> @llvm.smin.v16i8(<16 x i8> undef, <16 x i8> undef) call @llvm.smin.nvx1i8( undef, undef) call @llvm.smin.nvx2i8( undef, undef) call @llvm.smin.nvx4i8( undef, undef) call @llvm.smin.nvx8i8( undef, undef) call @llvm.smin.nvx16i8( undef, undef) call i16 @llvm.smin.i16(i16 undef, i16 undef) call <2 x i16> @llvm.smin.v2i16(<2 x i16> undef, <2 x i16> undef) call <4 x i16> @llvm.smin.v4i16(<4 x i16> undef, <4 x i16> undef) call <8 x i16> @llvm.smin.v8i16(<8 x i16> undef, <8 x i16> undef) call <16 x i16> @llvm.smin.v16i16(<16 x i16> undef, <16 x i16> undef) call @llvm.smin.nvx1i16( undef, undef) call @llvm.smin.nvx2i16( undef, undef) call @llvm.smin.nvx4i16( undef, undef) call @llvm.smin.nvx8i16( undef, undef) call @llvm.smin.nvx16i16( undef, undef) call i32 @llvm.smin.i32(i32 undef, i32 undef) call <2 x i32> @llvm.smin.v2i32(<2 x i32> undef, <2 x i32> undef) call <4 x i32> @llvm.smin.v4i32(<4 x i32> undef, <4 x i32> undef) call <8 x i32> @llvm.smin.v8i32(<8 x i32> undef, <8 x i32> undef) call <16 x i32> @llvm.smin.v16i32(<16 x i32> undef, <16 x i32> undef) call @llvm.smin.nvx1i32( undef, undef) call @llvm.smin.nvx2i32( undef, undef) call @llvm.smin.nvx4i32( undef, undef) call @llvm.smin.nvx8i32( undef, undef) call @llvm.smin.nvx16i32( undef, undef) call i64 @llvm.smin.i64(i64 undef, i64 undef) call <2 x i64> @llvm.smin.v2i64(<2 x i64> undef, <2 x i64> undef) call <4 x i64> @llvm.smin.v4i64(<4 x i64> undef, <4 x i64> undef) call <8 x i64> @llvm.smin.v8i64(<8 x i64> undef, <8 x i64> undef) call <16 x i64> @llvm.smin.v16i64(<16 x i64> undef, <16 x i64> undef) call @llvm.smin.nvx1i64( undef, undef) call @llvm.smin.nvx2i64( undef, undef) call @llvm.smin.nvx4i64( undef, undef) call @llvm.smin.nvx8i64( undef, undef) ret void } define void @umax() { ; CHECK-LABEL: 'umax' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call i8 @llvm.umax.i8(i8 undef, i8 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x i8> @llvm.umax.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x i8> @llvm.umax.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x i8> @llvm.umax.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x i8> @llvm.umax.v16i8(<16 x i8> undef, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.umax.nxv1i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.umax.nxv2i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.umax.nxv4i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.umax.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.umax.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call i16 @llvm.umax.i16(i16 undef, i16 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <2 x i16> @llvm.umax.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = call <4 x i16> @llvm.umax.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = call <8 x i16> @llvm.umax.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call <16 x i16> @llvm.umax.v16i16(<16 x i16> undef, <16 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.umax.nxv1i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.umax.nxv2i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.umax.nxv4i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.umax.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call @llvm.umax.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %21 = call i32 @llvm.umax.i32(i32 undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call <2 x i32> @llvm.umax.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = call <4 x i32> @llvm.umax.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = call <8 x i32> @llvm.umax.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call <16 x i32> @llvm.umax.v16i32(<16 x i32> undef, <16 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.umax.nxv1i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.umax.nxv2i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.umax.nxv4i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = call @llvm.umax.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = call @llvm.umax.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = call i64 @llvm.umax.i64(i64 undef, i64 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %32 = call <2 x i64> @llvm.umax.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call <4 x i64> @llvm.umax.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call <8 x i64> @llvm.umax.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call <16 x i64> @llvm.umax.v16i64(<16 x i64> undef, <16 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = call @llvm.umax.nxv1i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.umax.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.umax.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.umax.nxv8i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.umax.i8(i8 undef, i8 undef) call <2 x i8> @llvm.umax.v2i8(<2 x i8> undef, <2 x i8> undef) call <4 x i8> @llvm.umax.v4i8(<4 x i8> undef, <4 x i8> undef) call <8 x i8> @llvm.umax.v8i8(<8 x i8> undef, <8 x i8> undef) call <16 x i8> @llvm.umax.v16i8(<16 x i8> undef, <16 x i8> undef) call @llvm.umax.nvx1i8( undef, undef) call @llvm.umax.nvx2i8( undef, undef) call @llvm.umax.nvx4i8( undef, undef) call @llvm.umax.nvx8i8( undef, undef) call @llvm.umax.nvx16i8( undef, undef) call i16 @llvm.umax.i16(i16 undef, i16 undef) call <2 x i16> @llvm.umax.v2i16(<2 x i16> undef, <2 x i16> undef) call <4 x i16> @llvm.umax.v4i16(<4 x i16> undef, <4 x i16> undef) call <8 x i16> @llvm.umax.v8i16(<8 x i16> undef, <8 x i16> undef) call <16 x i16> @llvm.umax.v16i16(<16 x i16> undef, <16 x i16> undef) call @llvm.umax.nvx1i16( undef, undef) call @llvm.umax.nvx2i16( undef, undef) call @llvm.umax.nvx4i16( undef, undef) call @llvm.umax.nvx8i16( undef, undef) call @llvm.umax.nvx16i16( undef, undef) call i32 @llvm.umax.i32(i32 undef, i32 undef) call <2 x i32> @llvm.umax.v2i32(<2 x i32> undef, <2 x i32> undef) call <4 x i32> @llvm.umax.v4i32(<4 x i32> undef, <4 x i32> undef) call <8 x i32> @llvm.umax.v8i32(<8 x i32> undef, <8 x i32> undef) call <16 x i32> @llvm.umax.v16i32(<16 x i32> undef, <16 x i32> undef) call @llvm.umax.nvx1i32( undef, undef) call @llvm.umax.nvx2i32( undef, undef) call @llvm.umax.nvx4i32( undef, undef) call @llvm.umax.nvx8i32( undef, undef) call @llvm.umax.nvx16i32( undef, undef) call i64 @llvm.umax.i64(i64 undef, i64 undef) call <2 x i64> @llvm.umax.v2i64(<2 x i64> undef, <2 x i64> undef) call <4 x i64> @llvm.umax.v4i64(<4 x i64> undef, <4 x i64> undef) call <8 x i64> @llvm.umax.v8i64(<8 x i64> undef, <8 x i64> undef) call <16 x i64> @llvm.umax.v16i64(<16 x i64> undef, <16 x i64> undef) call @llvm.umax.nvx1i64( undef, undef) call @llvm.umax.nvx2i64( undef, undef) call @llvm.umax.nvx4i64( undef, undef) call @llvm.umax.nvx8i64( undef, undef) ret void } define void @umin() { ; CHECK-LABEL: 'umin' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call i8 @llvm.umin.i8(i8 undef, i8 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call <2 x i8> @llvm.umin.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = call <4 x i8> @llvm.umin.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = call <8 x i8> @llvm.umin.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = call <16 x i8> @llvm.umin.v16i8(<16 x i8> undef, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = call @llvm.umin.nxv1i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = call @llvm.umin.nxv2i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = call @llvm.umin.nxv4i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = call @llvm.umin.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call @llvm.umin.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call i16 @llvm.umin.i16(i16 undef, i16 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = call <2 x i16> @llvm.umin.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = call <4 x i16> @llvm.umin.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = call <8 x i16> @llvm.umin.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = call <16 x i16> @llvm.umin.v16i16(<16 x i16> undef, <16 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = call @llvm.umin.nxv1i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = call @llvm.umin.nxv2i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = call @llvm.umin.nxv4i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call @llvm.umin.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = call @llvm.umin.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %21 = call i32 @llvm.umin.i32(i32 undef, i32 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = call <2 x i32> @llvm.umin.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = call <4 x i32> @llvm.umin.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = call <8 x i32> @llvm.umin.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = call <16 x i32> @llvm.umin.v16i32(<16 x i32> undef, <16 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = call @llvm.umin.nxv1i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = call @llvm.umin.nxv2i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call @llvm.umin.nxv4i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = call @llvm.umin.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = call @llvm.umin.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = call i64 @llvm.umin.i64(i64 undef, i64 undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %32 = call <2 x i64> @llvm.umin.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %33 = call <4 x i64> @llvm.umin.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = call <8 x i64> @llvm.umin.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = call <16 x i64> @llvm.umin.v16i64(<16 x i64> undef, <16 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = call @llvm.umin.nxv1i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = call @llvm.umin.nxv2i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = call @llvm.umin.nxv4i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = call @llvm.umin.nxv8i64( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; call i8 @llvm.umin.i8(i8 undef, i8 undef) call <2 x i8> @llvm.umin.v2i8(<2 x i8> undef, <2 x i8> undef) call <4 x i8> @llvm.umin.v4i8(<4 x i8> undef, <4 x i8> undef) call <8 x i8> @llvm.umin.v8i8(<8 x i8> undef, <8 x i8> undef) call <16 x i8> @llvm.umin.v16i8(<16 x i8> undef, <16 x i8> undef) call @llvm.umin.nvx1i8( undef, undef) call @llvm.umin.nvx2i8( undef, undef) call @llvm.umin.nvx4i8( undef, undef) call @llvm.umin.nvx8i8( undef, undef) call @llvm.umin.nvx16i8( undef, undef) call i16 @llvm.umin.i16(i16 undef, i16 undef) call <2 x i16> @llvm.umin.v2i16(<2 x i16> undef, <2 x i16> undef) call <4 x i16> @llvm.umin.v4i16(<4 x i16> undef, <4 x i16> undef) call <8 x i16> @llvm.umin.v8i16(<8 x i16> undef, <8 x i16> undef) call <16 x i16> @llvm.umin.v16i16(<16 x i16> undef, <16 x i16> undef) call @llvm.umin.nvx1i16( undef, undef) call @llvm.umin.nvx2i16( undef, undef) call @llvm.umin.nvx4i16( undef, undef) call @llvm.umin.nvx8i16( undef, undef) call @llvm.umin.nvx16i16( undef, undef) call i32 @llvm.umin.i32(i32 undef, i32 undef) call <2 x i32> @llvm.umin.v2i32(<2 x i32> undef, <2 x i32> undef) call <4 x i32> @llvm.umin.v4i32(<4 x i32> undef, <4 x i32> undef) call <8 x i32> @llvm.umin.v8i32(<8 x i32> undef, <8 x i32> undef) call <16 x i32> @llvm.umin.v16i32(<16 x i32> undef, <16 x i32> undef) call @llvm.umin.nvx1i32( undef, undef) call @llvm.umin.nvx2i32( undef, undef) call @llvm.umin.nvx4i32( undef, undef) call @llvm.umin.nvx8i32( undef, undef) call @llvm.umin.nvx16i32( undef, undef) call i64 @llvm.umin.i64(i64 undef, i64 undef) call <2 x i64> @llvm.umin.v2i64(<2 x i64> undef, <2 x i64> undef) call <4 x i64> @llvm.umin.v4i64(<4 x i64> undef, <4 x i64> undef) call <8 x i64> @llvm.umin.v8i64(<8 x i64> undef, <8 x i64> undef) call <16 x i64> @llvm.umin.v16i64(<16 x i64> undef, <16 x i64> undef) call @llvm.umin.nvx1i64( undef, undef) call @llvm.umin.nvx2i64( undef, undef) call @llvm.umin.nvx4i64( undef, undef) call @llvm.umin.nvx8i64( undef, undef) ret void } declare i8 @llvm.smax.i8(i8, i8) declare <2 x i8> @llvm.smax.v2i8(<2 x i8>, <2 x i8>) declare <4 x i8> @llvm.smax.v4i8(<4 x i8>, <4 x i8>) declare <8 x i8> @llvm.smax.v8i8(<8 x i8>, <8 x i8>) declare <16 x i8> @llvm.smax.v16i8(<16 x i8>, <16 x i8>) declare @llvm.smax.nvx1i8(, ) declare @llvm.smax.nvx2i8(, ) declare @llvm.smax.nvx4i8(, ) declare @llvm.smax.nvx8i8(, ) declare @llvm.smax.nvx16i8(, ) declare i16 @llvm.smax.i16(i16, i16) declare <2 x i16> @llvm.smax.v2i16(<2 x i16>, <2 x i16>) declare <4 x i16> @llvm.smax.v4i16(<4 x i16>, <4 x i16>) declare <8 x i16> @llvm.smax.v8i16(<8 x i16>, <8 x i16>) declare <16 x i16> @llvm.smax.v16i16(<16 x i16>, <16 x i16>) declare @llvm.smax.nvx1i16(, ) declare @llvm.smax.nvx2i16(, ) declare @llvm.smax.nvx4i16(, ) declare @llvm.smax.nvx8i16(, ) declare @llvm.smax.nvx16i16(, ) declare i32 @llvm.smax.i32(i32, i32) declare <2 x i32> @llvm.smax.v2i32(<2 x i32>, <2 x i32>) declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) declare <8 x i32> @llvm.smax.v8i32(<8 x i32>, <8 x i32>) declare <16 x i32> @llvm.smax.v16i32(<16 x i32>, <16 x i32>) declare @llvm.smax.nvx1i32(, ) declare @llvm.smax.nvx2i32(, ) declare @llvm.smax.nvx4i32(, ) declare @llvm.smax.nvx8i32(, ) declare @llvm.smax.nvx16i32(, ) declare i64 @llvm.smax.i64(i64, i64) declare <2 x i64> @llvm.smax.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.smax.v4i64(<4 x i64>, <4 x i64>) declare <8 x i64> @llvm.smax.v8i64(<8 x i64>, <8 x i64>) declare <16 x i64> @llvm.smax.v16i64(<16 x i64>, <16 x i64>) declare @llvm.smax.nvx1i64(, ) declare @llvm.smax.nvx2i64(, ) declare @llvm.smax.nvx4i64(, ) declare @llvm.smax.nvx8i64(, ) declare i8 @llvm.smin.i8(i8, i8) declare <2 x i8> @llvm.smin.v2i8(<2 x i8>, <2 x i8>) declare <4 x i8> @llvm.smin.v4i8(<4 x i8>, <4 x i8>) declare <8 x i8> @llvm.smin.v8i8(<8 x i8>, <8 x i8>) declare <16 x i8> @llvm.smin.v16i8(<16 x i8>, <16 x i8>) declare @llvm.smin.nvx1i8(, ) declare @llvm.smin.nvx2i8(, ) declare @llvm.smin.nvx4i8(, ) declare @llvm.smin.nvx8i8(, ) declare @llvm.smin.nvx16i8(, ) declare i16 @llvm.smin.i16(i16, i16) declare <2 x i16> @llvm.smin.v2i16(<2 x i16>, <2 x i16>) declare <4 x i16> @llvm.smin.v4i16(<4 x i16>, <4 x i16>) declare <8 x i16> @llvm.smin.v8i16(<8 x i16>, <8 x i16>) declare <16 x i16> @llvm.smin.v16i16(<16 x i16>, <16 x i16>) declare @llvm.smin.nvx1i16(, ) declare @llvm.smin.nvx2i16(, ) declare @llvm.smin.nvx4i16(, ) declare @llvm.smin.nvx8i16(, ) declare @llvm.smin.nvx16i16(, ) declare i32 @llvm.smin.i32(i32, i32) declare <2 x i32> @llvm.smin.v2i32(<2 x i32>, <2 x i32>) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) declare <8 x i32> @llvm.smin.v8i32(<8 x i32>, <8 x i32>) declare <16 x i32> @llvm.smin.v16i32(<16 x i32>, <16 x i32>) declare @llvm.smin.nvx1i32(, ) declare @llvm.smin.nvx2i32(, ) declare @llvm.smin.nvx4i32(, ) declare @llvm.smin.nvx8i32(, ) declare @llvm.smin.nvx16i32(, ) declare i64 @llvm.smin.i64(i64, i64) declare <2 x i64> @llvm.smin.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.smin.v4i64(<4 x i64>, <4 x i64>) declare <8 x i64> @llvm.smin.v8i64(<8 x i64>, <8 x i64>) declare <16 x i64> @llvm.smin.v16i64(<16 x i64>, <16 x i64>) declare @llvm.smin.nvx1i64(, ) declare @llvm.smin.nvx2i64(, ) declare @llvm.smin.nvx4i64(, ) declare @llvm.smin.nvx8i64(, ) declare i8 @llvm.umax.i8(i8, i8) declare <2 x i8> @llvm.umax.v2i8(<2 x i8>, <2 x i8>) declare <4 x i8> @llvm.umax.v4i8(<4 x i8>, <4 x i8>) declare <8 x i8> @llvm.umax.v8i8(<8 x i8>, <8 x i8>) declare <16 x i8> @llvm.umax.v16i8(<16 x i8>, <16 x i8>) declare @llvm.umax.nvx1i8(, ) declare @llvm.umax.nvx2i8(, ) declare @llvm.umax.nvx4i8(, ) declare @llvm.umax.nvx8i8(, ) declare @llvm.umax.nvx16i8(, ) declare i16 @llvm.umax.i16(i16, i16) declare <2 x i16> @llvm.umax.v2i16(<2 x i16>, <2 x i16>) declare <4 x i16> @llvm.umax.v4i16(<4 x i16>, <4 x i16>) declare <8 x i16> @llvm.umax.v8i16(<8 x i16>, <8 x i16>) declare <16 x i16> @llvm.umax.v16i16(<16 x i16>, <16 x i16>) declare @llvm.umax.nvx1i16(, ) declare @llvm.umax.nvx2i16(, ) declare @llvm.umax.nvx4i16(, ) declare @llvm.umax.nvx8i16(, ) declare @llvm.umax.nvx16i16(, ) declare i32 @llvm.umax.i32(i32, i32) declare <2 x i32> @llvm.umax.v2i32(<2 x i32>, <2 x i32>) declare <4 x i32> @llvm.umax.v4i32(<4 x i32>, <4 x i32>) declare <8 x i32> @llvm.umax.v8i32(<8 x i32>, <8 x i32>) declare <16 x i32> @llvm.umax.v16i32(<16 x i32>, <16 x i32>) declare @llvm.umax.nvx1i32(, ) declare @llvm.umax.nvx2i32(, ) declare @llvm.umax.nvx4i32(, ) declare @llvm.umax.nvx8i32(, ) declare @llvm.umax.nvx16i32(, ) declare i64 @llvm.umax.i64(i64, i64) declare <2 x i64> @llvm.umax.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.umax.v4i64(<4 x i64>, <4 x i64>) declare <8 x i64> @llvm.umax.v8i64(<8 x i64>, <8 x i64>) declare <16 x i64> @llvm.umax.v16i64(<16 x i64>, <16 x i64>) declare @llvm.umax.nvx1i64(, ) declare @llvm.umax.nvx2i64(, ) declare @llvm.umax.nvx4i64(, ) declare @llvm.umax.nvx8i64(, ) declare i8 @llvm.umin.i8(i8, i8) declare <2 x i8> @llvm.umin.v2i8(<2 x i8>, <2 x i8>) declare <4 x i8> @llvm.umin.v4i8(<4 x i8>, <4 x i8>) declare <8 x i8> @llvm.umin.v8i8(<8 x i8>, <8 x i8>) declare <16 x i8> @llvm.umin.v16i8(<16 x i8>, <16 x i8>) declare @llvm.umin.nvx1i8(, ) declare @llvm.umin.nvx2i8(, ) declare @llvm.umin.nvx4i8(, ) declare @llvm.umin.nvx8i8(, ) declare @llvm.umin.nvx16i8(, ) declare i16 @llvm.umin.i16(i16, i16) declare <2 x i16> @llvm.umin.v2i16(<2 x i16>, <2 x i16>) declare <4 x i16> @llvm.umin.v4i16(<4 x i16>, <4 x i16>) declare <8 x i16> @llvm.umin.v8i16(<8 x i16>, <8 x i16>) declare <16 x i16> @llvm.umin.v16i16(<16 x i16>, <16 x i16>) declare @llvm.umin.nvx1i16(, ) declare @llvm.umin.nvx2i16(, ) declare @llvm.umin.nvx4i16(, ) declare @llvm.umin.nvx8i16(, ) declare @llvm.umin.nvx16i16(, ) declare i32 @llvm.umin.i32(i32, i32) declare <2 x i32> @llvm.umin.v2i32(<2 x i32>, <2 x i32>) declare <4 x i32> @llvm.umin.v4i32(<4 x i32>, <4 x i32>) declare <8 x i32> @llvm.umin.v8i32(<8 x i32>, <8 x i32>) declare <16 x i32> @llvm.umin.v16i32(<16 x i32>, <16 x i32>) declare @llvm.umin.nvx1i32(, ) declare @llvm.umin.nvx2i32(, ) declare @llvm.umin.nvx4i32(, ) declare @llvm.umin.nvx8i32(, ) declare @llvm.umin.nvx16i32(, ) declare i64 @llvm.umin.i64(i64, i64) declare <2 x i64> @llvm.umin.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.umin.v4i64(<4 x i64>, <4 x i64>) declare <8 x i64> @llvm.umin.v8i64(<8 x i64>, <8 x i64>) declare <16 x i64> @llvm.umin.v16i64(<16 x i64>, <16 x i64>) declare @llvm.umin.nvx1i64(, ) declare @llvm.umin.nvx2i64(, ) declare @llvm.umin.nvx4i64(, ) declare @llvm.umin.nvx8i64(, )