1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes='print<cost-model>' 2>&1 -disable-output -mtriple=riscv64 -mattr=+v,+f,+d,+zfh,+experimental-zvfh -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=1 < %s | FileCheck %s
; Check that we don't crash querying costs when vectors are not enabled.
; RUN: opt -passes='print<cost-model>' 2>&1 -disable-output -mtriple=riscv64
define void @select() {
; CHECK-LABEL: 'select'
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = select i1 undef, i1 undef, i1 undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = select <1 x i1> undef, <1 x i1> undef, <1 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %3 = select <2 x i1> undef, <2 x i1> undef, <2 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = select <4 x i1> undef, <4 x i1> undef, <4 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = select <8 x i1> undef, <8 x i1> undef, <8 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = select <16 x i1> undef, <16 x i1> undef, <16 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %7 = select <32 x i1> undef, <32 x i1> undef, <32 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = select <vscale x 1 x i1> undef, <vscale x 1 x i1> undef, <vscale x 1 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = select <vscale x 2 x i1> undef, <vscale x 2 x i1> undef, <vscale x 2 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = select <vscale x 4 x i1> undef, <vscale x 4 x i1> undef, <vscale x 4 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %11 = select <vscale x 8 x i1> undef, <vscale x 8 x i1> undef, <vscale x 8 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %12 = select <vscale x 16 x i1> undef, <vscale x 16 x i1> undef, <vscale x 16 x i1> undef
; CHECK-NEXT: Cost Model: Invalid cost for instruction: %13 = select <vscale x 32 x i1> undef, <vscale x 32 x i1> undef, <vscale x 32 x i1> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = select i1 undef, i8 undef, i8 undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = select <1 x i1> undef, <1 x i8> undef, <1 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %20 = select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = select <vscale x 1 x i1> undef, <vscale x 1 x i8> undef, <vscale x 1 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = select <vscale x 2 x i1> undef, <vscale x 2 x i8> undef, <vscale x 2 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = select <vscale x 4 x i1> undef, <vscale x 4 x i8> undef, <vscale x 4 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = select <vscale x 8 x i1> undef, <vscale x 8 x i8> undef, <vscale x 8 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = select <vscale x 16 x i1> undef, <vscale x 16 x i8> undef, <vscale x 16 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = select <vscale x 32 x i1> undef, <vscale x 32 x i8> undef, <vscale x 32 x i8> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = select i1 undef, i16 undef, i16 undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = select <1 x i1> undef, <1 x i16> undef, <1 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %29 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %31 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %33 = select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %34 = select <vscale x 1 x i1> undef, <vscale x 1 x i16> undef, <vscale x 1 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %35 = select <vscale x 2 x i1> undef, <vscale x 2 x i16> undef, <vscale x 2 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %36 = select <vscale x 4 x i1> undef, <vscale x 4 x i16> undef, <vscale x 4 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %37 = select <vscale x 8 x i1> undef, <vscale x 8 x i16> undef, <vscale x 8 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %38 = select <vscale x 16 x i1> undef, <vscale x 16 x i16> undef, <vscale x 16 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %39 = select <vscale x 32 x i1> undef, <vscale x 32 x i16> undef, <vscale x 32 x i16> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %40 = select i1 undef, i32 undef, i32 undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %41 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %42 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %43 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %44 = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %45 = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %46 = select <32 x i1> undef, <32 x i32> undef, <32 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %47 = select <vscale x 1 x i1> undef, <vscale x 1 x i32> undef, <vscale x 1 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %48 = select <vscale x 2 x i1> undef, <vscale x 2 x i32> undef, <vscale x 2 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %49 = select <vscale x 4 x i1> undef, <vscale x 4 x i32> undef, <vscale x 4 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %50 = select <vscale x 8 x i1> undef, <vscale x 8 x i32> undef, <vscale x 8 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %51 = select <vscale x 16 x i1> undef, <vscale x 16 x i32> undef, <vscale x 16 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %52 = select <vscale x 32 x i1> undef, <vscale x 32 x i32> undef, <vscale x 32 x i32> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %53 = select i1 undef, i64 undef, i64 undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %54 = select <1 x i1> undef, <1 x i64> undef, <1 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %55 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %56 = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %57 = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %58 = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %59 = select <32 x i1> undef, <32 x i64> undef, <32 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %60 = select <vscale x 1 x i1> undef, <vscale x 1 x i64> undef, <vscale x 1 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %61 = select <vscale x 2 x i1> undef, <vscale x 2 x i64> undef, <vscale x 2 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %62 = select <vscale x 4 x i1> undef, <vscale x 4 x i64> undef, <vscale x 4 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %63 = select <vscale x 8 x i1> undef, <vscale x 8 x i64> undef, <vscale x 8 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %64 = select <vscale x 16 x i1> undef, <vscale x 16 x i64> undef, <vscale x 16 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %65 = select <vscale x 32 x i1> undef, <vscale x 32 x i64> undef, <vscale x 32 x i64> undef
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
select i1 undef, i1 undef, i1 undef
select <1 x i1> undef, <1 x i1> undef, <1 x i1> undef
select <2 x i1> undef, <2 x i1> undef, <2 x i1> undef
select <4 x i1> undef, <4 x i1> undef, <4 x i1> undef
select <8 x i1> undef, <8 x i1> undef, <8 x i1> undef
select <16 x i1> undef, <16 x i1> undef, <16 x i1> undef
select <32 x i1> undef, <32 x i1> undef, <32 x i1> undef
select <vscale x 1 x i1> undef, <vscale x 1 x i1> undef, <vscale x 1 x i1> undef
select <vscale x 2 x i1> undef, <vscale x 2 x i1> undef, <vscale x 2 x i1> undef
select <vscale x 4 x i1> undef, <vscale x 4 x i1> undef, <vscale x 4 x i1> undef
select <vscale x 8 x i1> undef, <vscale x 8 x i1> undef, <vscale x 8 x i1> undef
select <vscale x 16 x i1> undef, <vscale x 16 x i1> undef, <vscale x 16 x i1> undef
select <vscale x 32 x i1> undef, <vscale x 32 x i1> undef, <vscale x 32 x i1> undef
select i1 undef, i8 undef, i8 undef
select <1 x i1> undef, <1 x i8> undef, <1 x i8> undef
select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
select <32 x i1> undef, <32 x i8> undef, <32 x i8> undef
select <vscale x 1 x i1> undef, <vscale x 1 x i8> undef, <vscale x 1 x i8> undef
select <vscale x 2 x i1> undef, <vscale x 2 x i8> undef, <vscale x 2 x i8> undef
select <vscale x 4 x i1> undef, <vscale x 4 x i8> undef, <vscale x 4 x i8> undef
select <vscale x 8 x i1> undef, <vscale x 8 x i8> undef, <vscale x 8 x i8> undef
select <vscale x 16 x i1> undef, <vscale x 16 x i8> undef, <vscale x 16 x i8> undef
select <vscale x 32 x i1> undef, <vscale x 32 x i8> undef, <vscale x 32 x i8> undef
select i1 undef, i16 undef, i16 undef
select <1 x i1> undef, <1 x i16> undef, <1 x i16> undef
select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef
select <32 x i1> undef, <32 x i16> undef, <32 x i16> undef
select <vscale x 1 x i1> undef, <vscale x 1 x i16> undef, <vscale x 1 x i16> undef
select <vscale x 2 x i1> undef, <vscale x 2 x i16> undef, <vscale x 2 x i16> undef
select <vscale x 4 x i1> undef, <vscale x 4 x i16> undef, <vscale x 4 x i16> undef
select <vscale x 8 x i1> undef, <vscale x 8 x i16> undef, <vscale x 8 x i16> undef
select <vscale x 16 x i1> undef, <vscale x 16 x i16> undef, <vscale x 16 x i16> undef
select <vscale x 32 x i1> undef, <vscale x 32 x i16> undef, <vscale x 32 x i16> undef
select i1 undef, i32 undef, i32 undef
select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef
select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef
select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef
select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef
select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef
select <32 x i1> undef, <32 x i32> undef, <32 x i32> undef
select <vscale x 1 x i1> undef, <vscale x 1 x i32> undef, <vscale x 1 x i32> undef
select <vscale x 2 x i1> undef, <vscale x 2 x i32> undef, <vscale x 2 x i32> undef
select <vscale x 4 x i1> undef, <vscale x 4 x i32> undef, <vscale x 4 x i32> undef
select <vscale x 8 x i1> undef, <vscale x 8 x i32> undef, <vscale x 8 x i32> undef
select <vscale x 16 x i1> undef, <vscale x 16 x i32> undef, <vscale x 16 x i32> undef
select <vscale x 32 x i1> undef, <vscale x 32 x i32> undef, <vscale x 32 x i32> undef
select i1 undef, i64 undef, i64 undef
select <1 x i1> undef, <1 x i64> undef, <1 x i64> undef
select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef
select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
select <32 x i1> undef, <32 x i64> undef, <32 x i64> undef
select <vscale x 1 x i1> undef, <vscale x 1 x i64> undef, <vscale x 1 x i64> undef
select <vscale x 2 x i1> undef, <vscale x 2 x i64> undef, <vscale x 2 x i64> undef
select <vscale x 4 x i1> undef, <vscale x 4 x i64> undef, <vscale x 4 x i64> undef
select <vscale x 8 x i1> undef, <vscale x 8 x i64> undef, <vscale x 8 x i64> undef
select <vscale x 16 x i1> undef, <vscale x 16 x i64> undef, <vscale x 16 x i64> undef
select <vscale x 32 x i1> undef, <vscale x 32 x i64> undef, <vscale x 32 x i64> undef
ret void
}
|