44 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mcpu=g5 | FileCheck %s2target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5define void @foo(ptr noalias nocapture %a, ptr noalias nocapture %b) #0 {6vector.ph:7 br label %vector.body8 9vector.body: ; preds = %vector.body, %vector.ph10 %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]11 %0 = getelementptr inbounds float, ptr %b, i64 %index12 %wide.load = load <4 x float>, ptr %0, align 413 %.sum11 = or i64 %index, 414 %1 = getelementptr float, ptr %b, i64 %.sum1115 %wide.load8 = load <4 x float>, ptr %1, align 416 %2 = fadd <4 x float> %wide.load, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>17 %3 = fadd <4 x float> %wide.load8, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>18 %4 = getelementptr inbounds float, ptr %a, i64 %index19 store <4 x float> %2, ptr %4, align 420 %.sum12 = or i64 %index, 421 %5 = getelementptr float, ptr %a, i64 %.sum1222 store <4 x float> %3, ptr %5, align 423 %index.next = add i64 %index, 824 %6 = icmp eq i64 %index.next, 1600025 br i1 %6, label %for.end, label %vector.body26 27; CHECK: @foo28; CHECK-DAG: li [[C0:[0-9]+]], 029; CHECK-DAG: lvx [[CNST:[0-9]+]],30; CHECK: .LBB0_1:31; CHECK-DAG: lvsl [[MASK1:[0-9]+]], [[B1:[0-9]+]], [[C0]]32; CHECK-DAG: add [[B3:[0-9]+]], [[B1]], [[C0]]33; CHECK-DAG: lvx [[LD1:[0-9]+]], [[B1]], [[C0]]34; CHECK-DAG: lvx [[LD2:[0-9]+]], [[B3]],35; CHECK-DAG: vperm [[R1:[0-9]+]], [[LD1]], [[LD2]], [[MASK1]]36; CHECK-DAG: vaddfp {{[0-9]+}}, [[R1]], [[CNST]]37; CHECK: blr38 39for.end: ; preds = %vector.body40 ret void41}42 43attributes #0 = { nounwind }44