84 lines · plain
1; RUN: llc -verify-machineinstrs -O2 -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s2 3; Function Attrs: norecurse nounwind4define void @test1(ptr noalias nocapture %a, ptr noalias nocapture readonly %b, ptr nocapture readnone %c, i32 signext %n) #0 {5 6; CHECK-LABEL: test17 8entry:9 %idxprom = sext i32 %n to i6410 %arrayidx = getelementptr inbounds i32, ptr %b, i64 %idxprom11 %0 = load i32, ptr %arrayidx, align 4, !tbaa !112 %conv = sitofp i32 %0 to float13 %mul = fmul float %conv, 0x400291688000000014 %arrayidx2 = getelementptr inbounds float, ptr %a, i64 %idxprom15 store float %mul, ptr %arrayidx2, align 4, !tbaa !516 ret void17 18; CHECK-NOT: mtvsrwa19; CHECK-NOT: mtfprwa20; CHECK: lfiwax [[REG:[0-9]+]], {{.*}}21; CHECK-NOT: mtvsrwa22; CHECK-NOT: mtfprwa23; CHECK: xscvsxdsp {{.*}}, [[REG]]24; CHECK-NOT: mtvsrwa25; CHECK-NOT: mtfprwa26; CHECK: blr27 28}29 30; Function Attrs: norecurse nounwind readonly31define float @test2(ptr nocapture readonly %b) #0 {32 33; CHECK-LABEL: test234 35entry:36 %0 = load i32, ptr %b, align 4, !tbaa !137 %conv = sitofp i32 %0 to float38 %mul = fmul float %conv, 0x40030A3D8000000039 ret float %mul40 41; CHECK-NOT: mtvsrwa42; CHECK-NOT: mtfprwa43; CHECK: lfiwax [[REG:[0-9]+]], {{.*}}44; CHECK-NOT: mtvsrwa45; CHECK-NOT: mtfprwa46; CHECK: xscvsxdsp {{.*}}, [[REG]]47; CHECK-NOT: mtvsrwa48; CHECK-NOT: mtfprwa49; CHECK: blr50 51}52 53; Function Attrs: norecurse nounwind54define void @test3(ptr noalias nocapture %a, ptr noalias nocapture readonly %b, ptr noalias nocapture %c, i32 signext %n) #0 {55 56; CHECK-LABEL: test357 58entry:59 %idxprom = sext i32 %n to i6460 %arrayidx = getelementptr inbounds i32, ptr %b, i64 %idxprom61 %0 = load i32, ptr %arrayidx, align 4, !tbaa !162 %conv = sitofp i32 %0 to float63 %mul = fmul float %conv, 0x400291688000000064 %arrayidx2 = getelementptr inbounds float, ptr %a, i64 %idxprom65 store float %mul, ptr %arrayidx2, align 4, !tbaa !566 %arrayidx6 = getelementptr inbounds i32, ptr %c, i64 %idxprom67 %1 = load i32, ptr %arrayidx6, align 4, !tbaa !168 %add = add nsw i32 %1, %069 store i32 %add, ptr %arrayidx6, align 4, !tbaa !170 ret void71 72; CHECK: mtfprwa73; CHECK: blr74 75}76 77!0 = !{!"clang version 3.9.0"}78!1 = !{!2, !2, i64 0}79!2 = !{!"int", !3, i64 0}80!3 = !{!"omnipotent char", !4, i64 0}81!4 = !{!"Simple C++ TBAA"}82!5 = !{!6, !6, i64 0}83!6 = !{!"float", !3, i64 0}84