1; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s -check-prefix=PWR7 2; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s -check-prefix=PWR8 3target datalayout = "E-m:e-i64:64-n32:64" 4target triple = "powerpc64-unknown-linux-gnu" 5 6; Function Attrs: nounwind 7define void @foo1(double* nocapture %x, double* nocapture readonly %y) #0 { 8entry: 9 %0 = bitcast double* %x to i8* 10 %1 = bitcast double* %y to i8* 11 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 32, i1 false) 12 ret void 13 14; PWR7-LABEL: @foo1 15; PWR7-NOT: bl memcpy 16; PWR7-DAG: li [[OFFSET:[0-9]+]], 16 17; PWR7-DAG: lxvd2x [[TMP0:[0-9]+]], 4, [[OFFSET]] 18; PWR7-DAG: stxvd2x [[TMP0]], 3, [[OFFSET]] 19; PWR7-DAG: lxvd2x [[TMP1:[0-9]+]], 0, 4 20; PWR7-DAG: stxvd2x [[TMP1]], 0, 3 21; PWR7: blr 22 23; PWR8-LABEL: @foo1 24; PWR8: lxvw4x 25; PWR8: stxvw4x 26; PWR8: blr 27} 28 29; Function Attrs: nounwind 30declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #0 31 32; Function Attrs: nounwind 33define void @foo2(double* nocapture %x, double* nocapture readonly %y) #0 { 34entry: 35 %0 = bitcast double* %x to i8* 36 %1 = bitcast double* %y to i8* 37 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 128, i1 false) 38 ret void 39 40; PWR7-LABEL: @foo2 41; PWR7: bl memcpy 42; PWR7: blr 43 44; PWR8-LABEL: @foo2 45; PWR8: lxvw4x 46; PWR8: stxvw4x 47; PWR8: blr 48} 49 50; Function Attrs: nounwind 51define void @bar1(double* nocapture %x) #0 { 52entry: 53 %0 = bitcast double* %x to i8* 54 tail call void @llvm.memset.p0i8.i64(i8* align 8 %0, i8 0, i64 128, i1 false) 55 ret void 56 57; PWR7-LABEL: @bar1 58; PWR7-NOT: bl memset 59; PWR7: stxvw4x 60; PWR7: blr 61 62; PWR8-LABEL: @bar1 63; PWR8-NOT: bl memset 64; PWR8: stxvw4x 65; PWR8: blr 66} 67 68; Function Attrs: nounwind 69define void @bar2(double* nocapture %x) #0 { 70entry: 71 %0 = bitcast double* %x to i8* 72 tail call void @llvm.memset.p0i8.i64(i8* align 32 %0, i8 0, i64 128, i1 false) 73 ret void 74 75; PWR7-LABEL: @bar2 76; PWR7-NOT: bl memset 77; PWR7: stxvw4x 78; PWR7: blr 79 80; PWR8-LABEL: @bar2 81; PWR8-NOT: bl memset 82; PWR8: stxvw4x 83; PWR8: blr 84} 85 86; Function Attrs: nounwind 87declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) #0 88 89attributes #0 = { nounwind } 90 91