brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.1 KiB · f725c19 Raw
265 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc -o - %s -mtriple=aarch64-none-linux-gnu | FileCheck %s3 4define <16 x i8> @test1(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {5; CHECK-LABEL: test1:6; CHECK:       // %bb.0: // %entry7; CHECK-NEXT:    ld1r { v1.8b }, [x1]8; CHECK-NEXT:    ld1r { v0.8b }, [x0]9; CHECK-NEXT:    mov v0.d[1], v1.d[0]10; CHECK-NEXT:    ret11entry:12  %0 = load i8, ptr %a, align 113  %1 = insertelement <8 x i8> poison, i8 %0, i64 014  %lane = shufflevector <8 x i8> %1, <8 x i8> poison, <8 x i32> zeroinitializer15  %2 = load i8, ptr %b, align 116  %3 = insertelement <8 x i8> poison, i8 %2, i64 017  %lane2 = shufflevector <8 x i8> %3, <8 x i8> poison, <8 x i32> zeroinitializer18  %shuffle.i = shufflevector <8 x i8> %lane, <8 x i8> %lane2, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>19  ret <16 x i8> %shuffle.i20}21 22define <16 x i8> @test2(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {23; CHECK-LABEL: test2:24; CHECK:       // %bb.0: // %entry25; CHECK-NEXT:    ld1r { v1.8b }, [x1]26; CHECK-NEXT:    ldrb w8, [x0]27; CHECK-NEXT:    dup v0.8b, w828; CHECK-NEXT:    mov v1.b[7], w829; CHECK-NEXT:    mov v0.d[1], v1.d[0]30; CHECK-NEXT:    ret31entry:32  %0 = load i8, ptr %a, align 133  %1 = insertelement <8 x i8> poison, i8 %0, i64 034  %lane = shufflevector <8 x i8> %1, <8 x i8> poison, <8 x i32> zeroinitializer35  %2 = load i8, ptr %b, align 136  %3 = insertelement <8 x i8> poison, i8 %2, i64 037  %lane2 = shufflevector <8 x i8> %3, <8 x i8> poison, <8 x i32> zeroinitializer38  %shuffle.i = shufflevector <8 x i8> %lane, <8 x i8> %lane2, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 0>39  ret <16 x i8> %shuffle.i40}41 42define <16 x i8> @test3(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {43; CHECK-LABEL: test3:44; CHECK:       // %bb.0: // %entry45; CHECK-NEXT:    ld1r { v0.8b }, [x0]46; CHECK-NEXT:    ld1r { v1.8b }, [x1]47; CHECK-NEXT:    zip1 v0.16b, v0.16b, v1.16b48; CHECK-NEXT:    ret49entry:50  %0 = load i8, ptr %a, align 151  %1 = insertelement <8 x i8> poison, i8 %0, i64 052  %lane = shufflevector <8 x i8> %1, <8 x i8> poison, <8 x i32> zeroinitializer53  %2 = load i8, ptr %b, align 154  %3 = insertelement <8 x i8> poison, i8 %2, i64 055  %lane2 = shufflevector <8 x i8> %3, <8 x i8> poison, <8 x i32> zeroinitializer56  %shuffle.i = shufflevector <8 x i8> %lane, <8 x i8> %lane2, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>57  ret <16 x i8> %shuffle.i58}59 60define <16 x i8> @test4(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {61; CHECK-LABEL: test4:62; CHECK:       // %bb.0: // %entry63; CHECK-NEXT:    ld1r { v1.8b }, [x0]64; CHECK-NEXT:    ld1r { v0.8b }, [x1]65; CHECK-NEXT:    mov v0.d[1], v1.d[0]66; CHECK-NEXT:    ret67entry:68  %0 = load i8, ptr %a, align 169  %1 = insertelement <8 x i8> poison, i8 %0, i64 070  %lane = shufflevector <8 x i8> %1, <8 x i8> poison, <8 x i32> zeroinitializer71  %2 = load i8, ptr %b, align 172  %3 = insertelement <8 x i8> poison, i8 %2, i64 073  %lane2 = shufflevector <8 x i8> %3, <8 x i8> poison, <8 x i32> zeroinitializer74  %shuffle.i = shufflevector <8 x i8> %lane, <8 x i8> %lane2, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>75  ret <16 x i8> %shuffle.i76}77 78define <16 x i8> @test5(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {79; CHECK-LABEL: test5:80; CHECK:       // %bb.0: // %entry81; CHECK-NEXT:    adrp x8, .LCPI4_082; CHECK-NEXT:    ld1r { v1.16b }, [x1]83; CHECK-NEXT:    ldr b0, [x0]84; CHECK-NEXT:    ldr q2, [x8, :lo12:.LCPI4_0]85; CHECK-NEXT:    tbl v0.16b, { v0.16b, v1.16b }, v2.16b86; CHECK-NEXT:    ret87entry:88  %0 = load i8, ptr %a, align 189  %1 = insertelement <8 x i8> poison, i8 %0, i64 090  %lane = shufflevector <8 x i8> %1, <8 x i8> poison, <8 x i32> zeroinitializer91  %2 = load i8, ptr %b, align 192  %3 = insertelement <8 x i8> poison, i8 %2, i64 093  %lane2 = shufflevector <8 x i8> %3, <8 x i8> poison, <8 x i32> zeroinitializer94  %shuffle.i = shufflevector <8 x i8> %lane, <8 x i8> %lane2, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 15>95  ret <16 x i8> %shuffle.i96}97 98define <8 x i8> @test6(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {99; CHECK-LABEL: test6:100; CHECK:       // %bb.0: // %entry101; CHECK-NEXT:    ld1r { v1.8b }, [x1]102; CHECK-NEXT:    ld1r { v0.8b }, [x0]103; CHECK-NEXT:    mov v0.s[1], v1.s[1]104; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $q0105; CHECK-NEXT:    ret106entry:107  %0 = load i8, ptr %a, align 1108  %1 = insertelement <4 x i8> poison, i8 %0, i64 0109  %lane = shufflevector <4 x i8> %1, <4 x i8> poison, <4 x i32> zeroinitializer110  %2 = load i8, ptr %b, align 1111  %3 = insertelement <4 x i8> poison, i8 %2, i64 0112  %lane2 = shufflevector <4 x i8> %3, <4 x i8> poison, <4 x i32> zeroinitializer113  %shuffle.i = shufflevector <4 x i8> %lane, <4 x i8> %lane2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>114  ret <8 x i8> %shuffle.i115}116 117define <8 x i8> @test7(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {118; CHECK-LABEL: test7:119; CHECK:       // %bb.0: // %entry120; CHECK-NEXT:    ld1r { v1.8b }, [x0]121; CHECK-NEXT:    ld1r { v0.8b }, [x1]122; CHECK-NEXT:    mov v0.s[1], v1.s[1]123; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $q0124; CHECK-NEXT:    ret125entry:126  %0 = load i8, ptr %a, align 1127  %1 = insertelement <4 x i8> poison, i8 %0, i64 0128  %lane = shufflevector <4 x i8> %1, <4 x i8> poison, <4 x i32> zeroinitializer129  %2 = load i8, ptr %b, align 1130  %3 = insertelement <4 x i8> poison, i8 %2, i64 0131  %lane2 = shufflevector <4 x i8> %3, <4 x i8> poison, <4 x i32> zeroinitializer132  %shuffle.i = shufflevector <4 x i8> %lane, <4 x i8> %lane2, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>133  ret <8 x i8> %shuffle.i134}135 136define <8 x i16> @test8(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {137; CHECK-LABEL: test8:138; CHECK:       // %bb.0: // %entry139; CHECK-NEXT:    ld1r { v1.4h }, [x1]140; CHECK-NEXT:    ld1r { v0.4h }, [x0]141; CHECK-NEXT:    mov v0.d[1], v1.d[0]142; CHECK-NEXT:    ret143entry:144  %0 = load i16, ptr %a, align 1145  %1 = insertelement <4 x i16> poison, i16 %0, i64 0146  %lane = shufflevector <4 x i16> %1, <4 x i16> poison, <4 x i32> zeroinitializer147  %2 = load i16, ptr %b, align 1148  %3 = insertelement <4 x i16> poison, i16 %2, i64 0149  %lane2 = shufflevector <4 x i16> %3, <4 x i16> poison, <4 x i32> zeroinitializer150  %shuffle.i = shufflevector <4 x i16> %lane, <4 x i16> %lane2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>151  ret <8 x i16> %shuffle.i152}153 154define <4 x i32> @test9(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {155; CHECK-LABEL: test9:156; CHECK:       // %bb.0: // %entry157; CHECK-NEXT:    ld1r { v1.2s }, [x1]158; CHECK-NEXT:    ld1r { v0.2s }, [x0]159; CHECK-NEXT:    mov v0.d[1], v1.d[0]160; CHECK-NEXT:    ret161entry:162  %0 = load i32, ptr %a, align 1163  %1 = insertelement <2 x i32> poison, i32 %0, i64 0164  %lane = shufflevector <2 x i32> %1, <2 x i32> poison, <2 x i32> zeroinitializer165  %2 = load i32, ptr %b, align 1166  %3 = insertelement <2 x i32> poison, i32 %2, i64 0167  %lane2 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer168  %shuffle.i = shufflevector <2 x i32> %lane, <2 x i32> %lane2, <4 x i32> <i32 0, i32 1, i32 2, i32 3>169  ret <4 x i32> %shuffle.i170}171 172define <2 x i64> @test10(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {173; CHECK-LABEL: test10:174; CHECK:       // %bb.0: // %entry175; CHECK-NEXT:    ldr d0, [x0]176; CHECK-NEXT:    ldr d1, [x1]177; CHECK-NEXT:    mov v0.d[1], v1.d[0]178; CHECK-NEXT:    ret179entry:180  %0 = load i64, ptr %a, align 1181  %lane = bitcast i64 %0 to <1 x i64>182  %1 = load i64, ptr %b, align 1183  %lane2 = bitcast i64 %1 to <1 x i64>184  %shuffle.i = shufflevector <1 x i64> %lane, <1 x i64> %lane2, <2 x i32> <i32 0, i32 1>185  ret <2 x i64> %shuffle.i186}187 188define <8 x i8> @test11(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {189; CHECK-LABEL: test11:190; CHECK:       // %bb.0: // %entry191; CHECK-NEXT:    ld1r { v0.8b }, [x0]192; CHECK-NEXT:    ld1r { v1.8b }, [x1]193; CHECK-NEXT:    fmov d2, d0194; CHECK-NEXT:    mov v0.h[2], v1.h[0]195; CHECK-NEXT:    mov v0.h[3], v2.h[0]196; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $q0197; CHECK-NEXT:    ret198entry:199  %0 = load i8, ptr %a, align 1200  %1 = insertelement <4 x i8> poison, i8 %0, i64 0201  %lane = shufflevector <4 x i8> %1, <4 x i8> poison, <4 x i32> zeroinitializer202  %2 = load i8, ptr %b, align 1203  %3 = insertelement <4 x i8> poison, i8 %2, i64 0204  %lane2 = shufflevector <4 x i8> %3, <4 x i8> poison, <4 x i32> zeroinitializer205  %shuffle.i = shufflevector <4 x i8> %lane, <4 x i8> %lane2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 1>206  ret <8 x i8> %shuffle.i207}208 209define <4 x i32> @test12(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {210; CHECK-LABEL: test12:211; CHECK:       // %bb.0: // %entry212; CHECK-NEXT:    ld1r { v0.2s }, [x0]213; CHECK-NEXT:    ldr w8, [x1]214; CHECK-NEXT:    mov v1.16b, v0.16b215; CHECK-NEXT:    mov v0.s[1], w8216; CHECK-NEXT:    mov v1.s[0], w8217; CHECK-NEXT:    mov v0.d[1], v1.d[0]218; CHECK-NEXT:    ret219entry:220  %0 = load i32, ptr %a, align 1221  %1 = insertelement <2 x i32> poison, i32 %0, i64 0222  %lane = shufflevector <2 x i32> %1, <2 x i32> poison, <2 x i32> zeroinitializer223  %2 = load i32, ptr %b, align 1224  %3 = insertelement <2 x i32> poison, i32 %2, i64 0225  %lane2 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer226  %shuffle.i = shufflevector <2 x i32> %lane, <2 x i32> %lane2, <4 x i32> <i32 0, i32 3, i32 2, i32 1>227  ret <4 x i32> %shuffle.i228}229 230define <2 x i64> @test13(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {231; CHECK-LABEL: test13:232; CHECK:       // %bb.0: // %entry233; CHECK-NEXT:    ldr d1, [x0]234; CHECK-NEXT:    ldr d0, [x1]235; CHECK-NEXT:    mov v0.d[1], v1.d[0]236; CHECK-NEXT:    ret237entry:238  %0 = load i64, ptr %a, align 1239  %lane = bitcast i64 %0 to <1 x i64>240  %1 = load i64, ptr %b, align 1241  %lane2 = bitcast i64 %1 to <1 x i64>242  %shuffle.i = shufflevector <1 x i64> %lane, <1 x i64> %lane2, <2 x i32> <i32 1, i32 0>243  ret <2 x i64> %shuffle.i244}245 246define <3 x i32> @test14(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {247; CHECK-LABEL: test14:248; CHECK:       // %bb.0: // %entry249; CHECK-NEXT:    ldr w8, [x0]250; CHECK-NEXT:    fmov s0, w8251; CHECK-NEXT:    mov v0.s[1], w8252; CHECK-NEXT:    ld1 { v0.s }[2], [x1]253; CHECK-NEXT:    ret254entry:255  %0 = load i32, ptr %a, align 1256  %1 = insertelement <2 x i32> poison, i32 %0, i64 0257  %lane = shufflevector <2 x i32> %1, <2 x i32> poison, <2 x i32> zeroinitializer258  %2 = load i32, ptr %b, align 1259  %3 = insertelement <2 x i32> poison, i32 %2, i64 0260  %lane2 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer261  %shuffle.i = shufflevector <2 x i32> %lane, <2 x i32> %lane2, <3 x i32> <i32 0, i32 1, i32 2>262  ret <3 x i32> %shuffle.i263}264 265