|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
|
2 |
| -; RUN: opt -mtriple=arm64-darwin-unknown -S -passes=consthoist < %s | FileCheck %s |
| 2 | +; RUN: opt -mtriple=arm64-darwin-unknown -S -passes=consthoist < %s | FileCheck %s --check-prefixes=CHECK,CV |
| 3 | +; RUN: opt -mtriple=arm64-darwin-unknown -S -passes=consthoist -use-constant-int-for-fixed-length-splat -use-constant-int-for-scalable-splat < %s | FileCheck %s --check-prefixes=CHECK,CI |
3 | 4 |
|
4 | 5 | define i128 @test1(i128 %a) {
|
5 | 6 | ; CHECK-LABEL: define i128 @test1(
|
@@ -122,13 +123,37 @@ define i64 @sdiv_minsize(i64 %a) minsize {
|
122 | 123 | }
|
123 | 124 |
|
124 | 125 | define <2 x i64> @sdiv_v2i64(<2 x i64> %a) {
|
125 |
| -; CHECK-LABEL: define <2 x i64> @sdiv_v2i64( |
126 |
| -; CHECK-SAME: <2 x i64> [[A:%.*]]) { |
127 |
| -; CHECK-NEXT: [[TMP1:%.*]] = sdiv <2 x i64> [[A]], <i64 4294967087, i64 4294967087> |
128 |
| -; CHECK-NEXT: [[TMP2:%.*]] = add <2 x i64> [[TMP1]], <i64 4294967087, i64 4294967087> |
129 |
| -; CHECK-NEXT: ret <2 x i64> [[TMP2]] |
| 126 | +; CV-LABEL: define <2 x i64> @sdiv_v2i64( |
| 127 | +; CV-SAME: <2 x i64> [[A:%.*]]) { |
| 128 | +; CV-NEXT: [[TMP1:%.*]] = sdiv <2 x i64> [[A]], <i64 4294967087, i64 4294967087> |
| 129 | +; CV-NEXT: [[TMP2:%.*]] = add <2 x i64> [[TMP1]], <i64 4294967087, i64 4294967087> |
| 130 | +; CV-NEXT: ret <2 x i64> [[TMP2]] |
| 131 | +; |
| 132 | +; CI-LABEL: define <2 x i64> @sdiv_v2i64( |
| 133 | +; CI-SAME: <2 x i64> [[A:%.*]]) { |
| 134 | +; CI-NEXT: [[TMP1:%.*]] = sdiv <2 x i64> [[A]], splat (i64 4294967087) |
| 135 | +; CI-NEXT: [[TMP2:%.*]] = add <2 x i64> [[TMP1]], splat (i64 4294967087) |
| 136 | +; CI-NEXT: ret <2 x i64> [[TMP2]] |
130 | 137 | ;
|
131 | 138 | %1 = sdiv <2 x i64> %a, <i64 4294967087, i64 4294967087>
|
132 | 139 | %2 = add <2 x i64> %1, <i64 4294967087, i64 4294967087>
|
133 | 140 | ret <2 x i64> %2
|
134 | 141 | }
|
| 142 | + |
| 143 | +define <vscale x 2 x i64> @sdiv_nxv2i64(<vscale x 2 x i64> %a) { |
| 144 | +; CV-LABEL: define <vscale x 2 x i64> @sdiv_nxv2i64( |
| 145 | +; CV-SAME: <vscale x 2 x i64> [[A:%.*]]) { |
| 146 | +; CV-NEXT: [[TMP1:%.*]] = sdiv <vscale x 2 x i64> [[A]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 4294967087, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer) |
| 147 | +; CV-NEXT: [[TMP2:%.*]] = add <vscale x 2 x i64> [[TMP1]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 4294967087, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer) |
| 148 | +; CV-NEXT: ret <vscale x 2 x i64> [[TMP2]] |
| 149 | +; |
| 150 | +; CI-LABEL: define <vscale x 2 x i64> @sdiv_nxv2i64( |
| 151 | +; CI-SAME: <vscale x 2 x i64> [[A:%.*]]) { |
| 152 | +; CI-NEXT: [[TMP1:%.*]] = sdiv <vscale x 2 x i64> [[A]], splat (i64 4294967087) |
| 153 | +; CI-NEXT: [[TMP2:%.*]] = add <vscale x 2 x i64> [[TMP1]], splat (i64 4294967087) |
| 154 | +; CI-NEXT: ret <vscale x 2 x i64> [[TMP2]] |
| 155 | +; |
| 156 | + %1 = sdiv <vscale x 2 x i64> %a, splat (i64 4294967087) |
| 157 | + %2 = add <vscale x 2 x i64> %1, splat (i64 4294967087) |
| 158 | + ret <vscale x 2 x i64> %2 |
| 159 | +} |
0 commit comments