19fe6b9e8SEric Tang; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 23cf15af2SeopXD; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s 39fe6b9e8SEric Tang 49fe6b9e8SEric Tangdeclare { <vscale x 1 x i8>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>) 59fe6b9e8SEric Tang 69fe6b9e8SEric Tangdefine <vscale x 1 x i8> @umulo_nxv1i8(<vscale x 1 x i8> %x, <vscale x 1 x i8> %y) { 79fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv1i8: 89fe6b9e8SEric Tang; CHECK: # %bb.0: 9*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma 10e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 11e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 12e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 13e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 149fe6b9e8SEric Tang; CHECK-NEXT: ret 159fe6b9e8SEric Tang %a = call { <vscale x 1 x i8>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i8(<vscale x 1 x i8> %x, <vscale x 1 x i8> %y) 169fe6b9e8SEric Tang %b = extractvalue { <vscale x 1 x i8>, <vscale x 1 x i1> } %a, 0 179fe6b9e8SEric Tang %c = extractvalue { <vscale x 1 x i8>, <vscale x 1 x i1> } %a, 1 189fe6b9e8SEric Tang %d = select <vscale x 1 x i1> %c, <vscale x 1 x i8> zeroinitializer, <vscale x 1 x i8> %b 199fe6b9e8SEric Tang ret <vscale x 1 x i8> %d 209fe6b9e8SEric Tang} 219fe6b9e8SEric Tang 229fe6b9e8SEric Tangdeclare { <vscale x 2 x i8>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>) 239fe6b9e8SEric Tang 249fe6b9e8SEric Tangdefine <vscale x 2 x i8> @umulo_nxv2i8(<vscale x 2 x i8> %x, <vscale x 2 x i8> %y) { 259fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv2i8: 269fe6b9e8SEric Tang; CHECK: # %bb.0: 27*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma 28e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 29e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 30e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 31e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 329fe6b9e8SEric Tang; CHECK-NEXT: ret 339fe6b9e8SEric Tang %a = call { <vscale x 2 x i8>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i8(<vscale x 2 x i8> %x, <vscale x 2 x i8> %y) 349fe6b9e8SEric Tang %b = extractvalue { <vscale x 2 x i8>, <vscale x 2 x i1> } %a, 0 359fe6b9e8SEric Tang %c = extractvalue { <vscale x 2 x i8>, <vscale x 2 x i1> } %a, 1 369fe6b9e8SEric Tang %d = select <vscale x 2 x i1> %c, <vscale x 2 x i8> zeroinitializer, <vscale x 2 x i8> %b 379fe6b9e8SEric Tang ret <vscale x 2 x i8> %d 389fe6b9e8SEric Tang} 399fe6b9e8SEric Tang 409fe6b9e8SEric Tangdeclare { <vscale x 4 x i8>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>) 419fe6b9e8SEric Tang 429fe6b9e8SEric Tangdefine <vscale x 4 x i8> @umulo_nxv4i8(<vscale x 4 x i8> %x, <vscale x 4 x i8> %y) { 439fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv4i8: 449fe6b9e8SEric Tang; CHECK: # %bb.0: 45*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma 46e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 47e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 48e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 49e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 509fe6b9e8SEric Tang; CHECK-NEXT: ret 519fe6b9e8SEric Tang %a = call { <vscale x 4 x i8>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i8(<vscale x 4 x i8> %x, <vscale x 4 x i8> %y) 529fe6b9e8SEric Tang %b = extractvalue { <vscale x 4 x i8>, <vscale x 4 x i1> } %a, 0 539fe6b9e8SEric Tang %c = extractvalue { <vscale x 4 x i8>, <vscale x 4 x i1> } %a, 1 549fe6b9e8SEric Tang %d = select <vscale x 4 x i1> %c, <vscale x 4 x i8> zeroinitializer, <vscale x 4 x i8> %b 559fe6b9e8SEric Tang ret <vscale x 4 x i8> %d 569fe6b9e8SEric Tang} 579fe6b9e8SEric Tang 589fe6b9e8SEric Tangdeclare { <vscale x 8 x i8>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>) 599fe6b9e8SEric Tang 609fe6b9e8SEric Tangdefine <vscale x 8 x i8> @umulo_nxv8i8(<vscale x 8 x i8> %x, <vscale x 8 x i8> %y) { 619fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv8i8: 629fe6b9e8SEric Tang; CHECK: # %bb.0: 63*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma 64e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 65e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 66e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 67e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 689fe6b9e8SEric Tang; CHECK-NEXT: ret 699fe6b9e8SEric Tang %a = call { <vscale x 8 x i8>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i8(<vscale x 8 x i8> %x, <vscale x 8 x i8> %y) 709fe6b9e8SEric Tang %b = extractvalue { <vscale x 8 x i8>, <vscale x 8 x i1> } %a, 0 719fe6b9e8SEric Tang %c = extractvalue { <vscale x 8 x i8>, <vscale x 8 x i1> } %a, 1 729fe6b9e8SEric Tang %d = select <vscale x 8 x i1> %c, <vscale x 8 x i8> zeroinitializer, <vscale x 8 x i8> %b 739fe6b9e8SEric Tang ret <vscale x 8 x i8> %d 749fe6b9e8SEric Tang} 759fe6b9e8SEric Tang 769fe6b9e8SEric Tangdeclare { <vscale x 16 x i8>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>) 779fe6b9e8SEric Tang 789fe6b9e8SEric Tangdefine <vscale x 16 x i8> @umulo_nxv16i8(<vscale x 16 x i8> %x, <vscale x 16 x i8> %y) { 799fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv16i8: 809fe6b9e8SEric Tang; CHECK: # %bb.0: 81*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma 82e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v12, v8, v10 83e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v12, 0 84e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v10 85e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 869fe6b9e8SEric Tang; CHECK-NEXT: ret 879fe6b9e8SEric Tang %a = call { <vscale x 16 x i8>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i8(<vscale x 16 x i8> %x, <vscale x 16 x i8> %y) 889fe6b9e8SEric Tang %b = extractvalue { <vscale x 16 x i8>, <vscale x 16 x i1> } %a, 0 899fe6b9e8SEric Tang %c = extractvalue { <vscale x 16 x i8>, <vscale x 16 x i1> } %a, 1 909fe6b9e8SEric Tang %d = select <vscale x 16 x i1> %c, <vscale x 16 x i8> zeroinitializer, <vscale x 16 x i8> %b 919fe6b9e8SEric Tang ret <vscale x 16 x i8> %d 929fe6b9e8SEric Tang} 939fe6b9e8SEric Tang 949fe6b9e8SEric Tangdeclare { <vscale x 32 x i8>, <vscale x 32 x i1> } @llvm.umul.with.overflow.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>) 959fe6b9e8SEric Tang 969fe6b9e8SEric Tangdefine <vscale x 32 x i8> @umulo_nxv32i8(<vscale x 32 x i8> %x, <vscale x 32 x i8> %y) { 979fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv32i8: 989fe6b9e8SEric Tang; CHECK: # %bb.0: 99*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma 100e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v16, v8, v12 101e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v16, 0 102e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v12 103e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1049fe6b9e8SEric Tang; CHECK-NEXT: ret 1059fe6b9e8SEric Tang %a = call { <vscale x 32 x i8>, <vscale x 32 x i1> } @llvm.umul.with.overflow.nxv32i8(<vscale x 32 x i8> %x, <vscale x 32 x i8> %y) 1069fe6b9e8SEric Tang %b = extractvalue { <vscale x 32 x i8>, <vscale x 32 x i1> } %a, 0 1079fe6b9e8SEric Tang %c = extractvalue { <vscale x 32 x i8>, <vscale x 32 x i1> } %a, 1 1089fe6b9e8SEric Tang %d = select <vscale x 32 x i1> %c, <vscale x 32 x i8> zeroinitializer, <vscale x 32 x i8> %b 1099fe6b9e8SEric Tang ret <vscale x 32 x i8> %d 1109fe6b9e8SEric Tang} 1119fe6b9e8SEric Tang 1129fe6b9e8SEric Tangdeclare { <vscale x 64 x i8>, <vscale x 64 x i1> } @llvm.umul.with.overflow.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>) 1139fe6b9e8SEric Tang 1149fe6b9e8SEric Tangdefine <vscale x 64 x i8> @umulo_nxv64i8(<vscale x 64 x i8> %x, <vscale x 64 x i8> %y) { 1159fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv64i8: 1169fe6b9e8SEric Tang; CHECK: # %bb.0: 117*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma 1189fe6b9e8SEric Tang; CHECK-NEXT: vmulhu.vv v24, v8, v16 1199fe6b9e8SEric Tang; CHECK-NEXT: vmsne.vi v0, v24, 0 1209fe6b9e8SEric Tang; CHECK-NEXT: vmul.vv v8, v8, v16 1219fe6b9e8SEric Tang; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1229fe6b9e8SEric Tang; CHECK-NEXT: ret 1239fe6b9e8SEric Tang %a = call { <vscale x 64 x i8>, <vscale x 64 x i1> } @llvm.umul.with.overflow.nxv64i8(<vscale x 64 x i8> %x, <vscale x 64 x i8> %y) 1249fe6b9e8SEric Tang %b = extractvalue { <vscale x 64 x i8>, <vscale x 64 x i1> } %a, 0 1259fe6b9e8SEric Tang %c = extractvalue { <vscale x 64 x i8>, <vscale x 64 x i1> } %a, 1 1269fe6b9e8SEric Tang %d = select <vscale x 64 x i1> %c, <vscale x 64 x i8> zeroinitializer, <vscale x 64 x i8> %b 1279fe6b9e8SEric Tang ret <vscale x 64 x i8> %d 1289fe6b9e8SEric Tang} 1299fe6b9e8SEric Tang 1309fe6b9e8SEric Tangdeclare { <vscale x 1 x i16>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>) 1319fe6b9e8SEric Tang 1329fe6b9e8SEric Tangdefine <vscale x 1 x i16> @umulo_nxv1i16(<vscale x 1 x i16> %x, <vscale x 1 x i16> %y) { 1339fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv1i16: 1349fe6b9e8SEric Tang; CHECK: # %bb.0: 135*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma 136e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 137e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 138e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 139e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1409fe6b9e8SEric Tang; CHECK-NEXT: ret 1419fe6b9e8SEric Tang %a = call { <vscale x 1 x i16>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i16(<vscale x 1 x i16> %x, <vscale x 1 x i16> %y) 1429fe6b9e8SEric Tang %b = extractvalue { <vscale x 1 x i16>, <vscale x 1 x i1> } %a, 0 1439fe6b9e8SEric Tang %c = extractvalue { <vscale x 1 x i16>, <vscale x 1 x i1> } %a, 1 1449fe6b9e8SEric Tang %d = select <vscale x 1 x i1> %c, <vscale x 1 x i16> zeroinitializer, <vscale x 1 x i16> %b 1459fe6b9e8SEric Tang ret <vscale x 1 x i16> %d 1469fe6b9e8SEric Tang} 1479fe6b9e8SEric Tang 1489fe6b9e8SEric Tangdeclare { <vscale x 2 x i16>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>) 1499fe6b9e8SEric Tang 1509fe6b9e8SEric Tangdefine <vscale x 2 x i16> @umulo_nxv2i16(<vscale x 2 x i16> %x, <vscale x 2 x i16> %y) { 1519fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv2i16: 1529fe6b9e8SEric Tang; CHECK: # %bb.0: 153*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma 154e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 155e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 156e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 157e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1589fe6b9e8SEric Tang; CHECK-NEXT: ret 1599fe6b9e8SEric Tang %a = call { <vscale x 2 x i16>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i16(<vscale x 2 x i16> %x, <vscale x 2 x i16> %y) 1609fe6b9e8SEric Tang %b = extractvalue { <vscale x 2 x i16>, <vscale x 2 x i1> } %a, 0 1619fe6b9e8SEric Tang %c = extractvalue { <vscale x 2 x i16>, <vscale x 2 x i1> } %a, 1 1629fe6b9e8SEric Tang %d = select <vscale x 2 x i1> %c, <vscale x 2 x i16> zeroinitializer, <vscale x 2 x i16> %b 1639fe6b9e8SEric Tang ret <vscale x 2 x i16> %d 1649fe6b9e8SEric Tang} 1659fe6b9e8SEric Tang 1669fe6b9e8SEric Tangdeclare { <vscale x 4 x i16>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>) 1679fe6b9e8SEric Tang 1689fe6b9e8SEric Tangdefine <vscale x 4 x i16> @umulo_nxv4i16(<vscale x 4 x i16> %x, <vscale x 4 x i16> %y) { 1699fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv4i16: 1709fe6b9e8SEric Tang; CHECK: # %bb.0: 171*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma 172e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 173e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 174e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 175e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1769fe6b9e8SEric Tang; CHECK-NEXT: ret 1779fe6b9e8SEric Tang %a = call { <vscale x 4 x i16>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i16(<vscale x 4 x i16> %x, <vscale x 4 x i16> %y) 1789fe6b9e8SEric Tang %b = extractvalue { <vscale x 4 x i16>, <vscale x 4 x i1> } %a, 0 1799fe6b9e8SEric Tang %c = extractvalue { <vscale x 4 x i16>, <vscale x 4 x i1> } %a, 1 1809fe6b9e8SEric Tang %d = select <vscale x 4 x i1> %c, <vscale x 4 x i16> zeroinitializer, <vscale x 4 x i16> %b 1819fe6b9e8SEric Tang ret <vscale x 4 x i16> %d 1829fe6b9e8SEric Tang} 1839fe6b9e8SEric Tang 1849fe6b9e8SEric Tangdeclare { <vscale x 8 x i16>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>) 1859fe6b9e8SEric Tang 1869fe6b9e8SEric Tangdefine <vscale x 8 x i16> @umulo_nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y) { 1879fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv8i16: 1889fe6b9e8SEric Tang; CHECK: # %bb.0: 189*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma 190e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v12, v8, v10 191e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v12, 0 192e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v10 193e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 1949fe6b9e8SEric Tang; CHECK-NEXT: ret 1959fe6b9e8SEric Tang %a = call { <vscale x 8 x i16>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y) 1969fe6b9e8SEric Tang %b = extractvalue { <vscale x 8 x i16>, <vscale x 8 x i1> } %a, 0 1979fe6b9e8SEric Tang %c = extractvalue { <vscale x 8 x i16>, <vscale x 8 x i1> } %a, 1 1989fe6b9e8SEric Tang %d = select <vscale x 8 x i1> %c, <vscale x 8 x i16> zeroinitializer, <vscale x 8 x i16> %b 1999fe6b9e8SEric Tang ret <vscale x 8 x i16> %d 2009fe6b9e8SEric Tang} 2019fe6b9e8SEric Tang 2029fe6b9e8SEric Tangdeclare { <vscale x 16 x i16>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>) 2039fe6b9e8SEric Tang 2049fe6b9e8SEric Tangdefine <vscale x 16 x i16> @umulo_nxv16i16(<vscale x 16 x i16> %x, <vscale x 16 x i16> %y) { 2059fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv16i16: 2069fe6b9e8SEric Tang; CHECK: # %bb.0: 207*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma 208e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v16, v8, v12 209e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v16, 0 210e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v12 211e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 2129fe6b9e8SEric Tang; CHECK-NEXT: ret 2139fe6b9e8SEric Tang %a = call { <vscale x 16 x i16>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i16(<vscale x 16 x i16> %x, <vscale x 16 x i16> %y) 2149fe6b9e8SEric Tang %b = extractvalue { <vscale x 16 x i16>, <vscale x 16 x i1> } %a, 0 2159fe6b9e8SEric Tang %c = extractvalue { <vscale x 16 x i16>, <vscale x 16 x i1> } %a, 1 2169fe6b9e8SEric Tang %d = select <vscale x 16 x i1> %c, <vscale x 16 x i16> zeroinitializer, <vscale x 16 x i16> %b 2179fe6b9e8SEric Tang ret <vscale x 16 x i16> %d 2189fe6b9e8SEric Tang} 2199fe6b9e8SEric Tang 2209fe6b9e8SEric Tangdeclare { <vscale x 32 x i16>, <vscale x 32 x i1> } @llvm.umul.with.overflow.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>) 2219fe6b9e8SEric Tang 2229fe6b9e8SEric Tangdefine <vscale x 32 x i16> @umulo_nxv32i16(<vscale x 32 x i16> %x, <vscale x 32 x i16> %y) { 2239fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv32i16: 2249fe6b9e8SEric Tang; CHECK: # %bb.0: 225*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma 2269fe6b9e8SEric Tang; CHECK-NEXT: vmulhu.vv v24, v8, v16 2279fe6b9e8SEric Tang; CHECK-NEXT: vmsne.vi v0, v24, 0 2289fe6b9e8SEric Tang; CHECK-NEXT: vmul.vv v8, v8, v16 2299fe6b9e8SEric Tang; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 2309fe6b9e8SEric Tang; CHECK-NEXT: ret 2319fe6b9e8SEric Tang %a = call { <vscale x 32 x i16>, <vscale x 32 x i1> } @llvm.umul.with.overflow.nxv32i16(<vscale x 32 x i16> %x, <vscale x 32 x i16> %y) 2329fe6b9e8SEric Tang %b = extractvalue { <vscale x 32 x i16>, <vscale x 32 x i1> } %a, 0 2339fe6b9e8SEric Tang %c = extractvalue { <vscale x 32 x i16>, <vscale x 32 x i1> } %a, 1 2349fe6b9e8SEric Tang %d = select <vscale x 32 x i1> %c, <vscale x 32 x i16> zeroinitializer, <vscale x 32 x i16> %b 2359fe6b9e8SEric Tang ret <vscale x 32 x i16> %d 2369fe6b9e8SEric Tang} 2379fe6b9e8SEric Tang 2389fe6b9e8SEric Tangdeclare { <vscale x 1 x i32>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>) 2399fe6b9e8SEric Tang 2409fe6b9e8SEric Tangdefine <vscale x 1 x i32> @umulo_nxv1i32(<vscale x 1 x i32> %x, <vscale x 1 x i32> %y) { 2419fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv1i32: 2429fe6b9e8SEric Tang; CHECK: # %bb.0: 243*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma 244e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 245e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 246e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 247e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 2489fe6b9e8SEric Tang; CHECK-NEXT: ret 2499fe6b9e8SEric Tang %a = call { <vscale x 1 x i32>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i32(<vscale x 1 x i32> %x, <vscale x 1 x i32> %y) 2509fe6b9e8SEric Tang %b = extractvalue { <vscale x 1 x i32>, <vscale x 1 x i1> } %a, 0 2519fe6b9e8SEric Tang %c = extractvalue { <vscale x 1 x i32>, <vscale x 1 x i1> } %a, 1 2529fe6b9e8SEric Tang %d = select <vscale x 1 x i1> %c, <vscale x 1 x i32> zeroinitializer, <vscale x 1 x i32> %b 2539fe6b9e8SEric Tang ret <vscale x 1 x i32> %d 2549fe6b9e8SEric Tang} 2559fe6b9e8SEric Tang 2569fe6b9e8SEric Tangdeclare { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>) 2579fe6b9e8SEric Tang 2589fe6b9e8SEric Tangdefine <vscale x 2 x i32> @umulo_nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y) { 2599fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv2i32: 2609fe6b9e8SEric Tang; CHECK: # %bb.0: 261*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma 262e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 263e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 264e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 265e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 2669fe6b9e8SEric Tang; CHECK-NEXT: ret 2679fe6b9e8SEric Tang %a = call { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i32(<vscale x 2 x i32> %x, <vscale x 2 x i32> %y) 2689fe6b9e8SEric Tang %b = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i1> } %a, 0 2699fe6b9e8SEric Tang %c = extractvalue { <vscale x 2 x i32>, <vscale x 2 x i1> } %a, 1 2709fe6b9e8SEric Tang %d = select <vscale x 2 x i1> %c, <vscale x 2 x i32> zeroinitializer, <vscale x 2 x i32> %b 2719fe6b9e8SEric Tang ret <vscale x 2 x i32> %d 2729fe6b9e8SEric Tang} 2739fe6b9e8SEric Tang 2749fe6b9e8SEric Tangdeclare { <vscale x 4 x i32>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>) 2759fe6b9e8SEric Tang 2769fe6b9e8SEric Tangdefine <vscale x 4 x i32> @umulo_nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) { 2779fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv4i32: 2789fe6b9e8SEric Tang; CHECK: # %bb.0: 279*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma 280e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v12, v8, v10 281e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v12, 0 282e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v10 283e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 2849fe6b9e8SEric Tang; CHECK-NEXT: ret 2859fe6b9e8SEric Tang %a = call { <vscale x 4 x i32>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) 2869fe6b9e8SEric Tang %b = extractvalue { <vscale x 4 x i32>, <vscale x 4 x i1> } %a, 0 2879fe6b9e8SEric Tang %c = extractvalue { <vscale x 4 x i32>, <vscale x 4 x i1> } %a, 1 2889fe6b9e8SEric Tang %d = select <vscale x 4 x i1> %c, <vscale x 4 x i32> zeroinitializer, <vscale x 4 x i32> %b 2899fe6b9e8SEric Tang ret <vscale x 4 x i32> %d 2909fe6b9e8SEric Tang} 2919fe6b9e8SEric Tang 2929fe6b9e8SEric Tangdeclare { <vscale x 8 x i32>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>) 2939fe6b9e8SEric Tang 2949fe6b9e8SEric Tangdefine <vscale x 8 x i32> @umulo_nxv8i32(<vscale x 8 x i32> %x, <vscale x 8 x i32> %y) { 2959fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv8i32: 2969fe6b9e8SEric Tang; CHECK: # %bb.0: 297*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma 298e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v16, v8, v12 299e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v16, 0 300e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v12 301e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3029fe6b9e8SEric Tang; CHECK-NEXT: ret 3039fe6b9e8SEric Tang %a = call { <vscale x 8 x i32>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i32(<vscale x 8 x i32> %x, <vscale x 8 x i32> %y) 3049fe6b9e8SEric Tang %b = extractvalue { <vscale x 8 x i32>, <vscale x 8 x i1> } %a, 0 3059fe6b9e8SEric Tang %c = extractvalue { <vscale x 8 x i32>, <vscale x 8 x i1> } %a, 1 3069fe6b9e8SEric Tang %d = select <vscale x 8 x i1> %c, <vscale x 8 x i32> zeroinitializer, <vscale x 8 x i32> %b 3079fe6b9e8SEric Tang ret <vscale x 8 x i32> %d 3089fe6b9e8SEric Tang} 3099fe6b9e8SEric Tang 3109fe6b9e8SEric Tangdeclare { <vscale x 16 x i32>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>) 3119fe6b9e8SEric Tang 3129fe6b9e8SEric Tangdefine <vscale x 16 x i32> @umulo_nxv16i32(<vscale x 16 x i32> %x, <vscale x 16 x i32> %y) { 3139fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv16i32: 3149fe6b9e8SEric Tang; CHECK: # %bb.0: 315*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma 3169fe6b9e8SEric Tang; CHECK-NEXT: vmulhu.vv v24, v8, v16 3179fe6b9e8SEric Tang; CHECK-NEXT: vmsne.vi v0, v24, 0 3189fe6b9e8SEric Tang; CHECK-NEXT: vmul.vv v8, v8, v16 3199fe6b9e8SEric Tang; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3209fe6b9e8SEric Tang; CHECK-NEXT: ret 3219fe6b9e8SEric Tang %a = call { <vscale x 16 x i32>, <vscale x 16 x i1> } @llvm.umul.with.overflow.nxv16i32(<vscale x 16 x i32> %x, <vscale x 16 x i32> %y) 3229fe6b9e8SEric Tang %b = extractvalue { <vscale x 16 x i32>, <vscale x 16 x i1> } %a, 0 3239fe6b9e8SEric Tang %c = extractvalue { <vscale x 16 x i32>, <vscale x 16 x i1> } %a, 1 3249fe6b9e8SEric Tang %d = select <vscale x 16 x i1> %c, <vscale x 16 x i32> zeroinitializer, <vscale x 16 x i32> %b 3259fe6b9e8SEric Tang ret <vscale x 16 x i32> %d 3269fe6b9e8SEric Tang} 3279fe6b9e8SEric Tang 3289fe6b9e8SEric Tangdeclare { <vscale x 1 x i64>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>) 3299fe6b9e8SEric Tang 3309fe6b9e8SEric Tangdefine <vscale x 1 x i64> @umulo_nxv1i64(<vscale x 1 x i64> %x, <vscale x 1 x i64> %y) { 3319fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv1i64: 3329fe6b9e8SEric Tang; CHECK: # %bb.0: 333*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma 334e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v10, v8, v9 335e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v10, 0 336e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v9 337e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3389fe6b9e8SEric Tang; CHECK-NEXT: ret 3399fe6b9e8SEric Tang %a = call { <vscale x 1 x i64>, <vscale x 1 x i1> } @llvm.umul.with.overflow.nxv1i64(<vscale x 1 x i64> %x, <vscale x 1 x i64> %y) 3409fe6b9e8SEric Tang %b = extractvalue { <vscale x 1 x i64>, <vscale x 1 x i1> } %a, 0 3419fe6b9e8SEric Tang %c = extractvalue { <vscale x 1 x i64>, <vscale x 1 x i1> } %a, 1 3429fe6b9e8SEric Tang %d = select <vscale x 1 x i1> %c, <vscale x 1 x i64> zeroinitializer, <vscale x 1 x i64> %b 3439fe6b9e8SEric Tang ret <vscale x 1 x i64> %d 3449fe6b9e8SEric Tang} 3459fe6b9e8SEric Tang 3469fe6b9e8SEric Tangdeclare { <vscale x 2 x i64>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>) 3479fe6b9e8SEric Tang 3489fe6b9e8SEric Tangdefine <vscale x 2 x i64> @umulo_nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y) { 3499fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv2i64: 3509fe6b9e8SEric Tang; CHECK: # %bb.0: 351*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma 352e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v12, v8, v10 353e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v12, 0 354e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v10 355e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3569fe6b9e8SEric Tang; CHECK-NEXT: ret 3579fe6b9e8SEric Tang %a = call { <vscale x 2 x i64>, <vscale x 2 x i1> } @llvm.umul.with.overflow.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y) 3589fe6b9e8SEric Tang %b = extractvalue { <vscale x 2 x i64>, <vscale x 2 x i1> } %a, 0 3599fe6b9e8SEric Tang %c = extractvalue { <vscale x 2 x i64>, <vscale x 2 x i1> } %a, 1 3609fe6b9e8SEric Tang %d = select <vscale x 2 x i1> %c, <vscale x 2 x i64> zeroinitializer, <vscale x 2 x i64> %b 3619fe6b9e8SEric Tang ret <vscale x 2 x i64> %d 3629fe6b9e8SEric Tang} 3639fe6b9e8SEric Tang 3649fe6b9e8SEric Tangdeclare { <vscale x 4 x i64>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>) 3659fe6b9e8SEric Tang 3669fe6b9e8SEric Tangdefine <vscale x 4 x i64> @umulo_nxv4i64(<vscale x 4 x i64> %x, <vscale x 4 x i64> %y) { 3679fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv4i64: 3689fe6b9e8SEric Tang; CHECK: # %bb.0: 369*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma 370e1acbda1SFraser Cormack; CHECK-NEXT: vmulhu.vv v16, v8, v12 371e1acbda1SFraser Cormack; CHECK-NEXT: vmsne.vi v0, v16, 0 372e1acbda1SFraser Cormack; CHECK-NEXT: vmul.vv v8, v8, v12 373e1acbda1SFraser Cormack; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3749fe6b9e8SEric Tang; CHECK-NEXT: ret 3759fe6b9e8SEric Tang %a = call { <vscale x 4 x i64>, <vscale x 4 x i1> } @llvm.umul.with.overflow.nxv4i64(<vscale x 4 x i64> %x, <vscale x 4 x i64> %y) 3769fe6b9e8SEric Tang %b = extractvalue { <vscale x 4 x i64>, <vscale x 4 x i1> } %a, 0 3779fe6b9e8SEric Tang %c = extractvalue { <vscale x 4 x i64>, <vscale x 4 x i1> } %a, 1 3789fe6b9e8SEric Tang %d = select <vscale x 4 x i1> %c, <vscale x 4 x i64> zeroinitializer, <vscale x 4 x i64> %b 3799fe6b9e8SEric Tang ret <vscale x 4 x i64> %d 3809fe6b9e8SEric Tang} 3819fe6b9e8SEric Tang 3829fe6b9e8SEric Tangdeclare { <vscale x 8 x i64>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>) 3839fe6b9e8SEric Tang 3849fe6b9e8SEric Tangdefine <vscale x 8 x i64> @umulo_nxv8i64(<vscale x 8 x i64> %x, <vscale x 8 x i64> %y) { 3859fe6b9e8SEric Tang; CHECK-LABEL: umulo_nxv8i64: 3869fe6b9e8SEric Tang; CHECK: # %bb.0: 387*d89d45caSPhilip Reames; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma 3889fe6b9e8SEric Tang; CHECK-NEXT: vmulhu.vv v24, v8, v16 3899fe6b9e8SEric Tang; CHECK-NEXT: vmsne.vi v0, v24, 0 3909fe6b9e8SEric Tang; CHECK-NEXT: vmul.vv v8, v8, v16 3919fe6b9e8SEric Tang; CHECK-NEXT: vmerge.vim v8, v8, 0, v0 3929fe6b9e8SEric Tang; CHECK-NEXT: ret 3939fe6b9e8SEric Tang %a = call { <vscale x 8 x i64>, <vscale x 8 x i1> } @llvm.umul.with.overflow.nxv8i64(<vscale x 8 x i64> %x, <vscale x 8 x i64> %y) 3949fe6b9e8SEric Tang %b = extractvalue { <vscale x 8 x i64>, <vscale x 8 x i1> } %a, 0 3959fe6b9e8SEric Tang %c = extractvalue { <vscale x 8 x i64>, <vscale x 8 x i1> } %a, 1 3969fe6b9e8SEric Tang %d = select <vscale x 8 x i1> %c, <vscale x 8 x i64> zeroinitializer, <vscale x 8 x i64> %b 3979fe6b9e8SEric Tang ret <vscale x 8 x i64> %d 3989fe6b9e8SEric Tang} 399