1 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512bw | FileCheck %s 2 3 ; CHECK-LABEL: test1 4 ; CHECK: vmovdqu8 5 ; CHECK: ret 6 define <64 x i8> @test1(i8 * %addr) { 7 %vaddr = bitcast i8* %addr to <64 x i8>* 8 %res = load <64 x i8>, <64 x i8>* %vaddr, align 1 9 ret <64 x i8>%res 10 } 11 12 ; CHECK-LABEL: test2 13 ; CHECK: vmovdqu8 14 ; CHECK: ret 15 define void @test2(i8 * %addr, <64 x i8> %data) { 16 %vaddr = bitcast i8* %addr to <64 x i8>* 17 store <64 x i8>%data, <64 x i8>* %vaddr, align 1 18 ret void 19 } 20 21 ; CHECK-LABEL: test3 22 ; CHECK: vmovdqu8{{.*{%k[1-7]}}} 23 ; CHECK: ret 24 define <64 x i8> @test3(i8 * %addr, <64 x i8> %old, <64 x i8> %mask1) { 25 %mask = icmp ne <64 x i8> %mask1, zeroinitializer 26 %vaddr = bitcast i8* %addr to <64 x i8>* 27 %r = load <64 x i8>, <64 x i8>* %vaddr, align 1 28 %res = select <64 x i1> %mask, <64 x i8> %r, <64 x i8> %old 29 ret <64 x i8>%res 30 } 31 32 ; CHECK-LABEL: test4 33 ; CHECK: vmovdqu8{{.*{%k[1-7]} {z}}} 34 ; CHECK: ret 35 define <64 x i8> @test4(i8 * %addr, <64 x i8> %mask1) { 36 %mask = icmp ne <64 x i8> %mask1, zeroinitializer 37 %vaddr = bitcast i8* %addr to <64 x i8>* 38 %r = load <64 x i8>, <64 x i8>* %vaddr, align 1 39 %res = select <64 x i1> %mask, <64 x i8> %r, <64 x i8> zeroinitializer 40 ret <64 x i8>%res 41 } 42 43 ; CHECK-LABEL: test5 44 ; CHECK: vmovdqu16 45 ; CHECK: ret 46 define <32 x i16> @test5(i8 * %addr) { 47 %vaddr = bitcast i8* %addr to <32 x i16>* 48 %res = load <32 x i16>, <32 x i16>* %vaddr, align 1 49 ret <32 x i16>%res 50 } 51 52 ; CHECK-LABEL: test6 53 ; CHECK: vmovdqu16 54 ; CHECK: ret 55 define void @test6(i8 * %addr, <32 x i16> %data) { 56 %vaddr = bitcast i8* %addr to <32 x i16>* 57 store <32 x i16>%data, <32 x i16>* %vaddr, align 1 58 ret void 59 } 60 61 ; CHECK-LABEL: test7 62 ; CHECK: vmovdqu16{{.*{%k[1-7]}}} 63 ; CHECK: ret 64 define <32 x i16> @test7(i8 * %addr, <32 x i16> %old, <32 x i16> %mask1) { 65 %mask = icmp ne <32 x i16> %mask1, zeroinitializer 66 %vaddr = bitcast i8* %addr to <32 x i16>* 67 %r = load <32 x i16>, <32 x i16>* %vaddr, align 1 68 %res = select <32 x i1> %mask, <32 x i16> %r, <32 x i16> %old 69 ret <32 x i16>%res 70 } 71 72 ; CHECK-LABEL: test8 73 ; CHECK: vmovdqu16{{.*{%k[1-7]} {z}}} 74 ; CHECK: ret 75 define <32 x i16> @test8(i8 * %addr, <32 x i16> %mask1) { 76 %mask = icmp ne <32 x i16> %mask1, zeroinitializer 77 %vaddr = bitcast i8* %addr to <32 x i16>* 78 %r = load <32 x i16>, <32 x i16>* %vaddr, align 1 79 %res = select <32 x i1> %mask, <32 x i16> %r, <32 x i16> zeroinitializer 80 ret <32 x i16>%res 81 } 82