Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
Craig Topper | 381b4fb | 2018-12-05 07:56:50 +0000 | [diff] [blame] | 2 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE2 |
| 3 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+ssse3 | FileCheck %s --check-prefixes=CHECK,SSE,SSSE3 |
| 4 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 |
| 5 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1 |
| 6 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2 |
| 7 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F |
| 8 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW |
| 9 | ; RUN: opt < %s -cost-model -mtriple=x86_64-apple-darwin -analyze -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 10 | |
| 11 | define i32 @reduce_i64(i32 %arg) { |
| 12 | ; SSE2-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 13 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 14 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 15 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 16 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 17 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 18 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 19 | ; |
| 20 | ; SSSE3-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 21 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 22 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 23 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 24 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 25 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 26 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 27 | ; |
| 28 | ; SSE42-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 29 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 30 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 31 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 32 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 33 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
| 34 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 35 | ; |
| 36 | ; AVX1-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 37 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 38 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 39 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 40 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 41 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 42 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 43 | ; |
| 44 | ; AVX2-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 45 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 46 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 47 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 48 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 49 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
| 50 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 51 | ; |
| 52 | ; AVX512-LABEL: 'reduce_i64' |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 53 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 54 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 55 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 56 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 57 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
| 58 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 59 | ; |
| 60 | %V1 = call i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64> undef) |
| 61 | %V2 = call i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64> undef) |
| 62 | %V4 = call i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64> undef) |
| 63 | %V8 = call i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64> undef) |
| 64 | %V16 = call i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64> undef) |
| 65 | ret i32 undef |
| 66 | } |
| 67 | |
| 68 | define i32 @reduce_i32(i32 %arg) { |
| 69 | ; SSE2-LABEL: 'reduce_i32' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 70 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 71 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 72 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 73 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 74 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 75 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 76 | ; |
| 77 | ; SSSE3-LABEL: 'reduce_i32' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 78 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 79 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 80 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 81 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 82 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 83 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 84 | ; |
| 85 | ; SSE42-LABEL: 'reduce_i32' |
| 86 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 87 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 88 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 89 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 90 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
| 91 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 92 | ; |
| 93 | ; AVX1-LABEL: 'reduce_i32' |
| 94 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 95 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 96 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 97 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 98 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
| 99 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 100 | ; |
| 101 | ; AVX2-LABEL: 'reduce_i32' |
| 102 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 103 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 104 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 105 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 106 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
| 107 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 108 | ; |
| 109 | ; AVX512-LABEL: 'reduce_i32' |
| 110 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 111 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 112 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 113 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 114 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
| 115 | ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 116 | ; |
| 117 | %V2 = call i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32> undef) |
| 118 | %V4 = call i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32> undef) |
| 119 | %V8 = call i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32> undef) |
| 120 | %V16 = call i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32> undef) |
| 121 | %V32 = call i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32> undef) |
| 122 | ret i32 undef |
| 123 | } |
| 124 | |
| 125 | define i32 @reduce_i16(i32 %arg) { |
| 126 | ; SSE2-LABEL: 'reduce_i16' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 127 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
| 128 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 129 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 130 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 131 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 132 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 133 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 134 | ; |
| 135 | ; SSSE3-LABEL: 'reduce_i16' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 136 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
| 137 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 138 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 139 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 140 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 141 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 142 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 143 | ; |
| 144 | ; SSE42-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 145 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 146 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 147 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 148 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 149 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 150 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
| 151 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 152 | ; |
| 153 | ; AVX1-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 154 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 155 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 156 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 157 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 158 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 159 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 82 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 160 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 161 | ; |
| 162 | ; AVX2-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 163 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 164 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 165 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 166 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 167 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 168 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
| 169 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 170 | ; |
| 171 | ; AVX512F-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 172 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 173 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 174 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 175 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 176 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 177 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
| 178 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 179 | ; |
| 180 | ; AVX512BW-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 181 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 182 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 183 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 184 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 185 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 186 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 187 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 188 | ; |
| 189 | ; AVX512DQ-LABEL: 'reduce_i16' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 190 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 191 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 192 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 193 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 194 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 195 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
| 196 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 197 | ; |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 198 | %V2 = call i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 199 | %V4 = call i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16> undef) |
| 200 | %V8 = call i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16> undef) |
| 201 | %V16 = call i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16> undef) |
| 202 | %V32 = call i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16> undef) |
| 203 | %V64 = call i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16> undef) |
| 204 | ret i32 undef |
| 205 | } |
| 206 | |
| 207 | define i32 @reduce_i8(i32 %arg) { |
| 208 | ; SSE2-LABEL: 'reduce_i8' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 209 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 210 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
| 211 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
| 212 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
| 213 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 214 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 215 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 85 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 216 | ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 217 | ; |
| 218 | ; SSSE3-LABEL: 'reduce_i8' |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 219 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 220 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
| 221 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
| 222 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
| 223 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 224 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 225 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 226 | ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 227 | ; |
| 228 | ; SSE42-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 229 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 230 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 231 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 232 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
| 233 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 234 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 235 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 236 | ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 237 | ; |
| 238 | ; AVX1-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 239 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 240 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 241 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 242 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
Simon Pilgrim | c934d3a | 2019-01-20 13:55:01 +0000 | [diff] [blame] | 243 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 244 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 83 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 245 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 97 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 246 | ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 247 | ; |
| 248 | ; AVX2-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 249 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 250 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 251 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 252 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 253 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 254 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 255 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
| 256 | ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 257 | ; |
| 258 | ; AVX512F-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 259 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 260 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 261 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 262 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 263 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 264 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 265 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
| 266 | ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 267 | ; |
| 268 | ; AVX512BW-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 269 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 270 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 271 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 272 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 273 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 274 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 275 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 63 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 276 | ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 277 | ; |
| 278 | ; AVX512DQ-LABEL: 'reduce_i8' |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 279 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 280 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 281 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
Craig Topper | 84d62ce | 2018-12-10 06:58:58 +0000 | [diff] [blame] | 282 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 283 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 284 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 285 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
| 286 | ; AVX512DQ-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| 287 | ; |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 288 | %V2 = call i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8> undef) |
| 289 | %V4 = call i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8> undef) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 290 | %V8 = call i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8> undef) |
| 291 | %V16 = call i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8> undef) |
| 292 | %V32 = call i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8> undef) |
| 293 | %V64 = call i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8> undef) |
| 294 | %V128 = call i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8> undef) |
| 295 | ret i32 undef |
| 296 | } |
| 297 | |
| 298 | declare i64 @llvm.experimental.vector.reduce.smax.i64.v1i64(<1 x i64>) |
| 299 | declare i64 @llvm.experimental.vector.reduce.smax.i64.v2i64(<2 x i64>) |
| 300 | declare i64 @llvm.experimental.vector.reduce.smax.i64.v4i64(<4 x i64>) |
| 301 | declare i64 @llvm.experimental.vector.reduce.smax.i64.v8i64(<8 x i64>) |
| 302 | declare i64 @llvm.experimental.vector.reduce.smax.i64.v16i64(<16 x i64>) |
| 303 | |
| 304 | declare i32 @llvm.experimental.vector.reduce.smax.i32.v2i32(<2 x i32>) |
| 305 | declare i32 @llvm.experimental.vector.reduce.smax.i32.v4i32(<4 x i32>) |
| 306 | declare i32 @llvm.experimental.vector.reduce.smax.i32.v8i32(<8 x i32>) |
| 307 | declare i32 @llvm.experimental.vector.reduce.smax.i32.v16i32(<16 x i32>) |
| 308 | declare i32 @llvm.experimental.vector.reduce.smax.i32.v32i32(<32 x i32>) |
| 309 | |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 310 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v2i16(<2 x i16>) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 311 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v4i16(<4 x i16>) |
| 312 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v8i16(<8 x i16>) |
| 313 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v16i16(<16 x i16>) |
| 314 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v32i16(<32 x i16>) |
| 315 | declare i16 @llvm.experimental.vector.reduce.smax.i16.v64i16(<64 x i16>) |
| 316 | |
Craig Topper | b4719e5 | 2018-12-05 07:26:57 +0000 | [diff] [blame] | 317 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v2i8(<2 x i8>) |
| 318 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v4i8(<4 x i8>) |
Simon Pilgrim | e612ab0 | 2018-10-20 14:29:59 +0000 | [diff] [blame] | 319 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v8i8(<8 x i8>) |
| 320 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v16i8(<16 x i8>) |
| 321 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v32i8(<32 x i8>) |
| 322 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v64i8(<64 x i8>) |
| 323 | declare i8 @llvm.experimental.vector.reduce.smax.i8.v128i8(<128 x i8>) |