85 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s -check-prefix=PWR72; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s -check-prefix=PWR83target datalayout = "E-m:e-i64:64-n32:64"4target triple = "powerpc64-unknown-linux-gnu"5 6; Function Attrs: nounwind7define void @foo1(ptr nocapture %x, ptr nocapture readonly %y) #0 {8entry:9 tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x, ptr align 8 %y, i64 32, i1 false)10 ret void11 12; PWR7-LABEL: @foo113; PWR7-NOT: bl memcpy14; PWR7-DAG: li [[OFFSET:[0-9]+]], 1615; PWR7-DAG: lxvd2x [[TMP0:[0-9]+]], 4, [[OFFSET]]16; PWR7-DAG: stxvd2x [[TMP0]], 3, [[OFFSET]]17; PWR7-DAG: lxvd2x [[TMP1:[0-9]+]], 0, 418; PWR7-DAG: stxvd2x [[TMP1]], 0, 319; PWR7: blr20 21; PWR8-LABEL: @foo122; PWR8: lxvw4x23; PWR8: stxvw4x24; PWR8: blr25}26 27; Function Attrs: nounwind28declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1) #029 30; Function Attrs: nounwind31define void @foo2(ptr nocapture %x, ptr nocapture readonly %y) #0 {32entry:33 tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x, ptr align 8 %y, i64 128, i1 false)34 ret void35 36; PWR7-LABEL: @foo237; PWR7: bl memcpy38; PWR7: blr39 40; PWR8-LABEL: @foo241; PWR8: lxvw4x42; PWR8: stxvw4x43; PWR8: blr44}45 46; Function Attrs: nounwind47define void @bar1(ptr nocapture %x) #0 {48entry:49 tail call void @llvm.memset.p0.i64(ptr align 8 %x, i8 0, i64 128, i1 false)50 ret void51 52; PWR7-LABEL: @bar153; PWR7-NOT: bl memset54; PWR7: stxvw4x55; PWR7: blr56 57; PWR8-LABEL: @bar158; PWR8-NOT: bl memset59; PWR8: stxvw4x60; PWR8: blr61}62 63; Function Attrs: nounwind64define void @bar2(ptr nocapture %x) #0 {65entry:66 tail call void @llvm.memset.p0.i64(ptr align 32 %x, i8 0, i64 128, i1 false)67 ret void68 69; PWR7-LABEL: @bar270; PWR7-NOT: bl memset71; PWR7: stxvw4x72; PWR7: blr73 74; PWR8-LABEL: @bar275; PWR8-NOT: bl memset76; PWR8: stxvw4x77; PWR8: blr78}79 80; Function Attrs: nounwind81declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) #082 83attributes #0 = { nounwind }84 85