12c552d31Schuongg3; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 22c552d31Schuongg3; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD 328064bfaSDavid Green; RUN: llc -mtriple=aarch64-none-linux-gnu -global-isel %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI 42c552d31Schuongg3 52c552d31Schuongg3; ===== Legal Scalars ===== 62c552d31Schuongg3 72c552d31Schuongg3define i8 @abs_i8(i8 %a){ 82c552d31Schuongg3; CHECK-SD-LABEL: abs_i8: 92c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 102c552d31Schuongg3; CHECK-SD-NEXT: sxtb w8, w0 112c552d31Schuongg3; CHECK-SD-NEXT: cmp w8, #0 122c552d31Schuongg3; CHECK-SD-NEXT: cneg w0, w8, mi 132c552d31Schuongg3; CHECK-SD-NEXT: ret 142c552d31Schuongg3; 152c552d31Schuongg3; CHECK-GI-LABEL: abs_i8: 162c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 172c552d31Schuongg3; CHECK-GI-NEXT: sxtb w8, w0 187bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cmp w8, #0 197bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cneg w0, w0, le 202c552d31Schuongg3; CHECK-GI-NEXT: ret 212c552d31Schuongg3entry: 222c552d31Schuongg3 %res = call i8 @llvm.abs.i8(i8 %a, i1 0) 232c552d31Schuongg3 ret i8 %res 242c552d31Schuongg3} 252c552d31Schuongg3declare i8 @llvm.abs.i8(i8, i1) 262c552d31Schuongg3 272c552d31Schuongg3define i16 @abs_i16(i16 %a){ 282c552d31Schuongg3; CHECK-SD-LABEL: abs_i16: 292c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 302c552d31Schuongg3; CHECK-SD-NEXT: sxth w8, w0 312c552d31Schuongg3; CHECK-SD-NEXT: cmp w8, #0 322c552d31Schuongg3; CHECK-SD-NEXT: cneg w0, w8, mi 332c552d31Schuongg3; CHECK-SD-NEXT: ret 342c552d31Schuongg3; 352c552d31Schuongg3; CHECK-GI-LABEL: abs_i16: 362c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 372c552d31Schuongg3; CHECK-GI-NEXT: sxth w8, w0 387bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cmp w8, #0 397bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cneg w0, w0, le 402c552d31Schuongg3; CHECK-GI-NEXT: ret 412c552d31Schuongg3entry: 422c552d31Schuongg3 %res = call i16 @llvm.abs.i16(i16 %a, i1 0) 432c552d31Schuongg3 ret i16 %res 442c552d31Schuongg3} 452c552d31Schuongg3declare i16 @llvm.abs.i16(i16, i1) 462c552d31Schuongg3 472c552d31Schuongg3define i32 @abs_i32(i32 %a){ 482c552d31Schuongg3; CHECK-SD-LABEL: abs_i32: 492c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 502c552d31Schuongg3; CHECK-SD-NEXT: cmp w0, #0 512c552d31Schuongg3; CHECK-SD-NEXT: cneg w0, w0, mi 522c552d31Schuongg3; CHECK-SD-NEXT: ret 532c552d31Schuongg3; 542c552d31Schuongg3; CHECK-GI-LABEL: abs_i32: 552c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 567bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cmp w0, #0 577bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cneg w0, w0, le 582c552d31Schuongg3; CHECK-GI-NEXT: ret 592c552d31Schuongg3entry: 602c552d31Schuongg3 %res = call i32 @llvm.abs.i32(i32 %a, i1 0) 612c552d31Schuongg3 ret i32 %res 622c552d31Schuongg3} 632c552d31Schuongg3declare i32 @llvm.abs.i32(i32, i1) 642c552d31Schuongg3 652c552d31Schuongg3define i64 @abs_i64(i64 %a){ 662c552d31Schuongg3; CHECK-SD-LABEL: abs_i64: 672c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 682c552d31Schuongg3; CHECK-SD-NEXT: cmp x0, #0 692c552d31Schuongg3; CHECK-SD-NEXT: cneg x0, x0, mi 702c552d31Schuongg3; CHECK-SD-NEXT: ret 712c552d31Schuongg3; 722c552d31Schuongg3; CHECK-GI-LABEL: abs_i64: 732c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 747bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cmp x0, #0 757bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cneg x0, x0, le 762c552d31Schuongg3; CHECK-GI-NEXT: ret 772c552d31Schuongg3entry: 782c552d31Schuongg3 %res = call i64 @llvm.abs.i64(i64 %a, i1 0) 792c552d31Schuongg3 ret i64 %res 802c552d31Schuongg3} 812c552d31Schuongg3declare i64 @llvm.abs.i64(i64, i1) 822c552d31Schuongg3 832c552d31Schuongg3define i128 @abs_i128(i128 %a){ 842c552d31Schuongg3; CHECK-SD-LABEL: abs_i128: 852c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 862c552d31Schuongg3; CHECK-SD-NEXT: asr x8, x1, #63 872c552d31Schuongg3; CHECK-SD-NEXT: eor x9, x0, x8 882c552d31Schuongg3; CHECK-SD-NEXT: eor x10, x1, x8 892c552d31Schuongg3; CHECK-SD-NEXT: subs x0, x9, x8 902c552d31Schuongg3; CHECK-SD-NEXT: sbc x1, x10, x8 912c552d31Schuongg3; CHECK-SD-NEXT: ret 922c552d31Schuongg3; 932c552d31Schuongg3; CHECK-GI-LABEL: abs_i128: 942c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 952c552d31Schuongg3; CHECK-GI-NEXT: asr x8, x1, #63 962c552d31Schuongg3; CHECK-GI-NEXT: adds x9, x0, x8 972c552d31Schuongg3; CHECK-GI-NEXT: adc x10, x1, x8 982c552d31Schuongg3; CHECK-GI-NEXT: eor x0, x9, x8 992c552d31Schuongg3; CHECK-GI-NEXT: eor x1, x10, x8 1002c552d31Schuongg3; CHECK-GI-NEXT: ret 1012c552d31Schuongg3entry: 1022c552d31Schuongg3 %res = call i128 @llvm.abs.i128(i128 %a, i1 0) 1032c552d31Schuongg3 ret i128 %res 1042c552d31Schuongg3} 1052c552d31Schuongg3declare i128 @llvm.abs.i128(i128, i1) 1062c552d31Schuongg3 1072c552d31Schuongg3; ===== Legal Vector Types ===== 1082c552d31Schuongg3 1092c552d31Schuongg3define <8 x i8> @abs_v8i8(<8 x i8> %a){ 1102c552d31Schuongg3; CHECK-LABEL: abs_v8i8: 1112c552d31Schuongg3; CHECK: // %bb.0: // %entry 1122c552d31Schuongg3; CHECK-NEXT: abs v0.8b, v0.8b 1132c552d31Schuongg3; CHECK-NEXT: ret 1142c552d31Schuongg3entry: 1152c552d31Schuongg3 %res = call <8 x i8> @llvm.abs.v8i8(<8 x i8> %a, i1 0) 1162c552d31Schuongg3 ret <8 x i8> %res 1172c552d31Schuongg3} 1182c552d31Schuongg3declare <8 x i8> @llvm.abs.v8i8(<8 x i8>, i1) 1192c552d31Schuongg3 1202c552d31Schuongg3define <16 x i8> @abs_v16i8(<16 x i8> %a){ 1212c552d31Schuongg3; CHECK-LABEL: abs_v16i8: 1222c552d31Schuongg3; CHECK: // %bb.0: // %entry 1232c552d31Schuongg3; CHECK-NEXT: abs v0.16b, v0.16b 1242c552d31Schuongg3; CHECK-NEXT: ret 1252c552d31Schuongg3entry: 1262c552d31Schuongg3 %res = call <16 x i8> @llvm.abs.v16i8(<16 x i8> %a, i1 0) 1272c552d31Schuongg3 ret <16 x i8> %res 1282c552d31Schuongg3} 1292c552d31Schuongg3declare <16 x i8> @llvm.abs.v16i8(<16 x i8>, i1) 1302c552d31Schuongg3 1312c552d31Schuongg3define <4 x i16> @abs_v4i16(<4 x i16> %a){ 1322c552d31Schuongg3; CHECK-LABEL: abs_v4i16: 1332c552d31Schuongg3; CHECK: // %bb.0: // %entry 1342c552d31Schuongg3; CHECK-NEXT: abs v0.4h, v0.4h 1352c552d31Schuongg3; CHECK-NEXT: ret 1362c552d31Schuongg3entry: 1372c552d31Schuongg3 %res = call <4 x i16> @llvm.abs.v4i16(<4 x i16> %a, i1 0) 1382c552d31Schuongg3 ret <4 x i16> %res 1392c552d31Schuongg3} 1402c552d31Schuongg3declare <4 x i16> @llvm.abs.v4i16(<4 x i16>, i1) 1412c552d31Schuongg3 1422c552d31Schuongg3define <8 x i16> @abs_v8i16(<8 x i16> %a){ 1432c552d31Schuongg3; CHECK-LABEL: abs_v8i16: 1442c552d31Schuongg3; CHECK: // %bb.0: // %entry 1452c552d31Schuongg3; CHECK-NEXT: abs v0.8h, v0.8h 1462c552d31Schuongg3; CHECK-NEXT: ret 1472c552d31Schuongg3entry: 1482c552d31Schuongg3 %res = call <8 x i16> @llvm.abs.v8i16(<8 x i16> %a, i1 0) 1492c552d31Schuongg3 ret <8 x i16> %res 1502c552d31Schuongg3} 1512c552d31Schuongg3declare <8 x i16> @llvm.abs.v8i16(<8 x i16>, i1) 1522c552d31Schuongg3 1532c552d31Schuongg3define <2 x i32> @abs_v2i32(<2 x i32> %a){ 1542c552d31Schuongg3; CHECK-LABEL: abs_v2i32: 1552c552d31Schuongg3; CHECK: // %bb.0: // %entry 1562c552d31Schuongg3; CHECK-NEXT: abs v0.2s, v0.2s 1572c552d31Schuongg3; CHECK-NEXT: ret 1582c552d31Schuongg3entry: 1592c552d31Schuongg3 %res = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %a, i1 0) 1602c552d31Schuongg3 ret <2 x i32> %res 1612c552d31Schuongg3} 1622c552d31Schuongg3declare <2 x i32> @llvm.abs.v2i32(<2 x i32>, i1) 1632c552d31Schuongg3 1642c552d31Schuongg3define <4 x i32> @abs_v4i32(<4 x i32> %a){ 1652c552d31Schuongg3; CHECK-LABEL: abs_v4i32: 1662c552d31Schuongg3; CHECK: // %bb.0: // %entry 1672c552d31Schuongg3; CHECK-NEXT: abs v0.4s, v0.4s 1682c552d31Schuongg3; CHECK-NEXT: ret 1692c552d31Schuongg3entry: 1702c552d31Schuongg3 %res = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %a, i1 0) 1712c552d31Schuongg3 ret <4 x i32> %res 1722c552d31Schuongg3} 1732c552d31Schuongg3declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1) 1742c552d31Schuongg3 1752c552d31Schuongg3define <2 x i64> @abs_v2i64(<2 x i64> %a){ 1762c552d31Schuongg3; CHECK-LABEL: abs_v2i64: 1772c552d31Schuongg3; CHECK: // %bb.0: // %entry 1782c552d31Schuongg3; CHECK-NEXT: abs v0.2d, v0.2d 1792c552d31Schuongg3; CHECK-NEXT: ret 1802c552d31Schuongg3entry: 1812c552d31Schuongg3 %res = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %a, i1 0) 1822c552d31Schuongg3 ret <2 x i64> %res 1832c552d31Schuongg3} 1842c552d31Schuongg3declare <2 x i64> @llvm.abs.v2i64(<2 x i64>, i1) 1852c552d31Schuongg3 1862c552d31Schuongg3; ===== Smaller/Larger Width Vectors with Legal Element Sizes ===== 1872c552d31Schuongg3 1882c552d31Schuongg3define <4 x i8> @abs_v4i8(<4 x i8> %a){ 1892c552d31Schuongg3; CHECK-LABEL: abs_v4i8: 1902c552d31Schuongg3; CHECK: // %bb.0: // %entry 1912c552d31Schuongg3; CHECK-NEXT: shl v0.4h, v0.4h, #8 1922c552d31Schuongg3; CHECK-NEXT: sshr v0.4h, v0.4h, #8 1932c552d31Schuongg3; CHECK-NEXT: abs v0.4h, v0.4h 1942c552d31Schuongg3; CHECK-NEXT: ret 1952c552d31Schuongg3entry: 1962c552d31Schuongg3 %res = call <4 x i8> @llvm.abs.v4i8(<4 x i8> %a, i1 0) 1972c552d31Schuongg3 ret <4 x i8> %res 1982c552d31Schuongg3} 1992c552d31Schuongg3declare <4 x i8> @llvm.abs.v4i8(<4 x i8>, i1) 2002c552d31Schuongg3 2012c552d31Schuongg3define <32 x i8> @abs_v32i8(<32 x i8> %a){ 2022c552d31Schuongg3; CHECK-LABEL: abs_v32i8: 2032c552d31Schuongg3; CHECK: // %bb.0: // %entry 2042c552d31Schuongg3; CHECK-NEXT: abs v0.16b, v0.16b 2052c552d31Schuongg3; CHECK-NEXT: abs v1.16b, v1.16b 2062c552d31Schuongg3; CHECK-NEXT: ret 2072c552d31Schuongg3entry: 2082c552d31Schuongg3 %res = call <32 x i8> @llvm.abs.v32i8(<32 x i8> %a, i1 0) 2092c552d31Schuongg3 ret <32 x i8> %res 2102c552d31Schuongg3} 2112c552d31Schuongg3declare <32 x i8> @llvm.abs.v32i8(<32 x i8>, i1) 2122c552d31Schuongg3 2132c552d31Schuongg3define <2 x i16> @abs_v2i16(<2 x i16> %a){ 2142c552d31Schuongg3; CHECK-LABEL: abs_v2i16: 2152c552d31Schuongg3; CHECK: // %bb.0: // %entry 2162c552d31Schuongg3; CHECK-NEXT: shl v0.2s, v0.2s, #16 2172c552d31Schuongg3; CHECK-NEXT: sshr v0.2s, v0.2s, #16 2182c552d31Schuongg3; CHECK-NEXT: abs v0.2s, v0.2s 2192c552d31Schuongg3; CHECK-NEXT: ret 2202c552d31Schuongg3entry: 2212c552d31Schuongg3 %res = call <2 x i16> @llvm.abs.v2i16(<2 x i16> %a, i1 0) 2222c552d31Schuongg3 ret <2 x i16> %res 2232c552d31Schuongg3} 2242c552d31Schuongg3declare <2 x i16> @llvm.abs.v2i16(<2 x i16>, i1) 2252c552d31Schuongg3 2262c552d31Schuongg3define <16 x i16> @abs_v16i16(<16 x i16> %a){ 2272c552d31Schuongg3; CHECK-LABEL: abs_v16i16: 2282c552d31Schuongg3; CHECK: // %bb.0: // %entry 2292c552d31Schuongg3; CHECK-NEXT: abs v0.8h, v0.8h 2302c552d31Schuongg3; CHECK-NEXT: abs v1.8h, v1.8h 2312c552d31Schuongg3; CHECK-NEXT: ret 2322c552d31Schuongg3entry: 2332c552d31Schuongg3 %res = call <16 x i16> @llvm.abs.v16i16(<16 x i16> %a, i1 0) 2342c552d31Schuongg3 ret <16 x i16> %res 2352c552d31Schuongg3} 2362c552d31Schuongg3declare <16 x i16> @llvm.abs.v16i16(<16 x i16>, i1) 2372c552d31Schuongg3 2382c552d31Schuongg3define <1 x i32> @abs_v1i32(<1 x i32> %a){ 2392c552d31Schuongg3; CHECK-SD-LABEL: abs_v1i32: 2402c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 2412c552d31Schuongg3; CHECK-SD-NEXT: abs v0.2s, v0.2s 2422c552d31Schuongg3; CHECK-SD-NEXT: ret 2432c552d31Schuongg3; 2442c552d31Schuongg3; CHECK-GI-LABEL: abs_v1i32: 2452c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 2461b12974cSDavid Green; CHECK-GI-NEXT: fmov w8, s0 2477bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: fmov w9, s0 2487bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cmp w8, #0 2497bb87d53SMadhur Amilkanthwar; CHECK-GI-NEXT: cneg w8, w9, le 2509b5971adSchuongg3; CHECK-GI-NEXT: mov v0.s[0], w8 251*61510b51SSander de Smalen; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0 2522c552d31Schuongg3; CHECK-GI-NEXT: ret 2532c552d31Schuongg3entry: 2542c552d31Schuongg3 %res = call <1 x i32> @llvm.abs.v1i32(<1 x i32> %a, i1 0) 2552c552d31Schuongg3 ret <1 x i32> %res 2562c552d31Schuongg3} 2572c552d31Schuongg3declare <1 x i32> @llvm.abs.v1i32(<1 x i32>, i1) 2582c552d31Schuongg3 2592c552d31Schuongg3define <8 x i32> @abs_v8i32(<8 x i32> %a){ 2602c552d31Schuongg3; CHECK-LABEL: abs_v8i32: 2612c552d31Schuongg3; CHECK: // %bb.0: // %entry 2622c552d31Schuongg3; CHECK-NEXT: abs v0.4s, v0.4s 2632c552d31Schuongg3; CHECK-NEXT: abs v1.4s, v1.4s 2642c552d31Schuongg3; CHECK-NEXT: ret 2652c552d31Schuongg3entry: 2662c552d31Schuongg3 %res = call <8 x i32> @llvm.abs.v8i32(<8 x i32> %a, i1 0) 2672c552d31Schuongg3 ret <8 x i32> %res 2682c552d31Schuongg3} 2692c552d31Schuongg3declare <8 x i32> @llvm.abs.v8i32(<8 x i32>, i1) 2702c552d31Schuongg3 2712c552d31Schuongg3define <4 x i64> @abs_v4i64(<4 x i64> %a){ 2722c552d31Schuongg3; CHECK-LABEL: abs_v4i64: 2732c552d31Schuongg3; CHECK: // %bb.0: // %entry 2742c552d31Schuongg3; CHECK-NEXT: abs v0.2d, v0.2d 2752c552d31Schuongg3; CHECK-NEXT: abs v1.2d, v1.2d 2762c552d31Schuongg3; CHECK-NEXT: ret 2772c552d31Schuongg3entry: 2782c552d31Schuongg3 %res = call <4 x i64> @llvm.abs.v4i64(<4 x i64> %a, i1 0) 2792c552d31Schuongg3 ret <4 x i64> %res 2802c552d31Schuongg3} 2812c552d31Schuongg3declare <4 x i64> @llvm.abs.v4i64(<4 x i64>, i1) 2822c552d31Schuongg3 28375823082SDavid Greendefine <2 x i128> @abs_v4i128(<2 x i128> %a){ 28475823082SDavid Green; CHECK-SD-LABEL: abs_v4i128: 28575823082SDavid Green; CHECK-SD: // %bb.0: // %entry 28675823082SDavid Green; CHECK-SD-NEXT: asr x8, x1, #63 28775823082SDavid Green; CHECK-SD-NEXT: asr x9, x3, #63 28875823082SDavid Green; CHECK-SD-NEXT: eor x10, x0, x8 28975823082SDavid Green; CHECK-SD-NEXT: eor x11, x1, x8 29075823082SDavid Green; CHECK-SD-NEXT: subs x0, x10, x8 29175823082SDavid Green; CHECK-SD-NEXT: eor x10, x2, x9 29275823082SDavid Green; CHECK-SD-NEXT: sbc x1, x11, x8 29375823082SDavid Green; CHECK-SD-NEXT: eor x8, x3, x9 29475823082SDavid Green; CHECK-SD-NEXT: subs x2, x10, x9 29575823082SDavid Green; CHECK-SD-NEXT: sbc x3, x8, x9 29675823082SDavid Green; CHECK-SD-NEXT: ret 29775823082SDavid Green; 29875823082SDavid Green; CHECK-GI-LABEL: abs_v4i128: 29975823082SDavid Green; CHECK-GI: // %bb.0: // %entry 30075823082SDavid Green; CHECK-GI-NEXT: asr x8, x1, #63 30175823082SDavid Green; CHECK-GI-NEXT: asr x9, x3, #63 30275823082SDavid Green; CHECK-GI-NEXT: adds x10, x0, x8 30375823082SDavid Green; CHECK-GI-NEXT: adc x11, x1, x8 30475823082SDavid Green; CHECK-GI-NEXT: adds x12, x2, x9 30575823082SDavid Green; CHECK-GI-NEXT: eor x0, x10, x8 30675823082SDavid Green; CHECK-GI-NEXT: adc x13, x3, x9 30775823082SDavid Green; CHECK-GI-NEXT: eor x1, x11, x8 30875823082SDavid Green; CHECK-GI-NEXT: eor x2, x12, x9 30975823082SDavid Green; CHECK-GI-NEXT: eor x3, x13, x9 31075823082SDavid Green; CHECK-GI-NEXT: ret 31175823082SDavid Greenentry: 31275823082SDavid Green %res = call <2 x i128> @llvm.abs.v2i128(<2 x i128> %a, i1 0) 31375823082SDavid Green ret <2 x i128> %res 31475823082SDavid Green} 31575823082SDavid Greendeclare <2 x i128> @llvm.abs.v2i128(<2 x i128>, i1) 31675823082SDavid Green 3172c552d31Schuongg3; ===== Vectors with Non-Pow 2 Widths ===== 3182c552d31Schuongg3 3192c552d31Schuongg3define <3 x i8> @abs_v3i8(<3 x i8> %a){ 3202c552d31Schuongg3; CHECK-SD-LABEL: abs_v3i8: 3212c552d31Schuongg3; CHECK-SD: // %bb.0: // %entry 3222c552d31Schuongg3; CHECK-SD-NEXT: fmov s0, w0 3232c552d31Schuongg3; CHECK-SD-NEXT: mov v0.h[1], w1 3242c552d31Schuongg3; CHECK-SD-NEXT: mov v0.h[2], w2 3252c552d31Schuongg3; CHECK-SD-NEXT: shl v0.4h, v0.4h, #8 3262c552d31Schuongg3; CHECK-SD-NEXT: sshr v0.4h, v0.4h, #8 3272c552d31Schuongg3; CHECK-SD-NEXT: abs v0.4h, v0.4h 3282c552d31Schuongg3; CHECK-SD-NEXT: umov w0, v0.h[0] 3292c552d31Schuongg3; CHECK-SD-NEXT: umov w1, v0.h[1] 3302c552d31Schuongg3; CHECK-SD-NEXT: umov w2, v0.h[2] 3312c552d31Schuongg3; CHECK-SD-NEXT: ret 3322c552d31Schuongg3; 3332c552d31Schuongg3; CHECK-GI-LABEL: abs_v3i8: 3342c552d31Schuongg3; CHECK-GI: // %bb.0: // %entry 3352c552d31Schuongg3; CHECK-GI-NEXT: fmov s0, w0 3369b5971adSchuongg3; CHECK-GI-NEXT: mov v0.b[1], w1 3379b5971adSchuongg3; CHECK-GI-NEXT: mov v0.b[2], w2 3382c552d31Schuongg3; CHECK-GI-NEXT: abs v0.8b, v0.8b 3392c552d31Schuongg3; CHECK-GI-NEXT: umov w0, v0.b[0] 3402c552d31Schuongg3; CHECK-GI-NEXT: umov w1, v0.b[1] 3412c552d31Schuongg3; CHECK-GI-NEXT: umov w2, v0.b[2] 3422c552d31Schuongg3; CHECK-GI-NEXT: ret 3432c552d31Schuongg3entry: 3442c552d31Schuongg3 %res = call <3 x i8> @llvm.abs.v3i8(<3 x i8> %a, i1 0) 3452c552d31Schuongg3 ret <3 x i8> %res 3462c552d31Schuongg3} 3472c552d31Schuongg3declare <3 x i8> @llvm.abs.v3i8(<3 x i8>, i1) 3482c552d31Schuongg3 3492c552d31Schuongg3define <7 x i8> @abs_v7i8(<7 x i8> %a){ 3502c552d31Schuongg3; CHECK-LABEL: abs_v7i8: 3512c552d31Schuongg3; CHECK: // %bb.0: // %entry 3522c552d31Schuongg3; CHECK-NEXT: abs v0.8b, v0.8b 3532c552d31Schuongg3; CHECK-NEXT: ret 3542c552d31Schuongg3entry: 3552c552d31Schuongg3 %res = call <7 x i8> @llvm.abs.v7i8(<7 x i8> %a, i1 0) 3562c552d31Schuongg3 ret <7 x i8> %res 3572c552d31Schuongg3} 3582c552d31Schuongg3declare <7 x i8> @llvm.abs.v7i8(<7 x i8>, i1) 3592c552d31Schuongg3 3602c552d31Schuongg3define <3 x i16> @abs_v3i16(<3 x i16> %a){ 3612c552d31Schuongg3; CHECK-LABEL: abs_v3i16: 3622c552d31Schuongg3; CHECK: // %bb.0: // %entry 3632c552d31Schuongg3; CHECK-NEXT: abs v0.4h, v0.4h 3642c552d31Schuongg3; CHECK-NEXT: ret 3652c552d31Schuongg3entry: 3662c552d31Schuongg3 %res = call <3 x i16> @llvm.abs.v3i16(<3 x i16> %a, i1 0) 3672c552d31Schuongg3 ret <3 x i16> %res 3682c552d31Schuongg3} 3692c552d31Schuongg3declare <3 x i16> @llvm.abs.v3i16(<3 x i16>, i1) 3702c552d31Schuongg3 3712c552d31Schuongg3define <7 x i16> @abs_v7i16(<7 x i16> %a){ 3722c552d31Schuongg3; CHECK-LABEL: abs_v7i16: 3732c552d31Schuongg3; CHECK: // %bb.0: // %entry 3742c552d31Schuongg3; CHECK-NEXT: abs v0.8h, v0.8h 3752c552d31Schuongg3; CHECK-NEXT: ret 3762c552d31Schuongg3entry: 3772c552d31Schuongg3 %res = call <7 x i16> @llvm.abs.v7i16(<7 x i16> %a, i1 0) 3782c552d31Schuongg3 ret <7 x i16> %res 3792c552d31Schuongg3} 3802c552d31Schuongg3declare <7 x i16> @llvm.abs.v7i16(<7 x i16>, i1) 3812c552d31Schuongg3 3822c552d31Schuongg3define <3 x i32> @abs_v3i32(<3 x i32> %a){ 3832c552d31Schuongg3; CHECK-LABEL: abs_v3i32: 3842c552d31Schuongg3; CHECK: // %bb.0: // %entry 3852c552d31Schuongg3; CHECK-NEXT: abs v0.4s, v0.4s 3862c552d31Schuongg3; CHECK-NEXT: ret 3872c552d31Schuongg3entry: 3882c552d31Schuongg3 %res = call <3 x i32> @llvm.abs.v3i32(<3 x i32> %a, i1 0) 3892c552d31Schuongg3 ret <3 x i32> %res 3902c552d31Schuongg3} 3912c552d31Schuongg3declare <3 x i32> @llvm.abs.v3i32(<3 x i32>, i1) 392