brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · a974159 Raw
41 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5; Function Attrs: nounwind readonly6define float @tf(ptr nocapture readonly %i, i32 signext %o) #0 {7entry:8  %idx.ext = sext i32 %o to i649  %add.ptr = getelementptr inbounds float, ptr %i, i64 %idx.ext10  %0 = load float, ptr %add.ptr, align 411  %add.ptr.sum = add nsw i64 %idx.ext, 112  %add.ptr3 = getelementptr inbounds float, ptr %i, i64 %add.ptr.sum13  %1 = load float, ptr %add.ptr3, align 414  %add = fadd float %0, %115  ret float %add16 17; CHECK-LABEL: @tf18; CHECK: lfsux19; CHECK: blr20}21 22; Function Attrs: nounwind readonly23define double @td(ptr nocapture readonly %i, i32 signext %o) #0 {24entry:25  %idx.ext = sext i32 %o to i6426  %add.ptr = getelementptr inbounds double, ptr %i, i64 %idx.ext27  %0 = load double, ptr %add.ptr, align 828  %add.ptr.sum = add nsw i64 %idx.ext, 129  %add.ptr3 = getelementptr inbounds double, ptr %i, i64 %add.ptr.sum30  %1 = load double, ptr %add.ptr3, align 831  %add = fadd double %0, %132  ret double %add33 34; CHECK-LABEL: @td35; CHECK: lfdux36; CHECK: blr37}38 39attributes #0 = { nounwind readonly }40 41