brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.7 KiB · af21cd6 Raw
101 lines · plain
1; REQUIRES: asserts2; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes=inline -inline-cost-full=true -inline-threshold=0 -inline-instr-cost=5 -inline-call-penalty=0 -debug-only=inline < %s 2>&1 | FileCheck %s3 4; CHECK:      NOT Inlining (cost={{[0-9]+}}, threshold={{[0-9]+}}), Call:   %noinlinecall1 = call noundef i64 @non_inlining_call5; CHECK:      NOT Inlining (cost={{[0-9]+}}, threshold={{[0-9]+}}), Call:   %noinlinecall2 = call noundef i64 @non_inlining_call6; CHECK-NOT:  NOT Inlining (cost={{[0-9]+}}, threshold={{[0-9]+}}), Call:   %inlinecall1 = call noundef i64 @inlining_call7; CHECK-NOT:  NOT Inlining (cost={{[0-9]+}}, threshold={{[0-9]+}}), Call:   %inlinecall2 = call noundef i64 @inlining_call8 9define noundef i64 @non_inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0) {10entry:11  %xor = xor i64 %a0, %b012  %xor1 = xor i64 %xor, %c013  %xor2 = xor i64 %xor1, %d014  %xor3 = xor i64 %xor2, %e015  %xor4 = xor i64 %xor3, %f016  %xor5 = xor i64 %xor4, %g017  %xor6 = xor i64 %xor5, %h018  %xor7 = xor i64 %xor6, %i019  %xor8 = xor i64 %xor7, %j020  %xor9 = xor i64 %xor8, %k021  %xor10 = xor i64 %xor9, %l022  %xor11 = xor i64 %xor10, %m023  %xor12 = xor i64 %xor11, %n024  %xor13 = xor i64 %xor12, %o025  %xor14 = xor i64 %xor13, %p026  %xor15 = xor i64 %xor14, 127  %xor16 = xor i64 %xor15, 228  ret i64 %xor1629}30 31define noundef i64 @inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0, i64 noundef %q0) {32entry:33  %xor = xor i64 %a0, %b034  %xor1 = xor i64 %xor, %c035  %xor2 = xor i64 %xor1, %d036  %xor3 = xor i64 %xor2, %e037  %xor4 = xor i64 %xor3, %f038  %xor5 = xor i64 %xor4, %g039  %xor6 = xor i64 %xor5, %h040  %xor7 = xor i64 %xor6, %i041  %xor8 = xor i64 %xor7, %j042  %xor9 = xor i64 %xor8, %k043  %xor10 = xor i64 %xor9, %l044  %xor11 = xor i64 %xor10, %m045  %xor12 = xor i64 %xor11, %n046  %xor13 = xor i64 %xor12, %o047  %xor14 = xor i64 %xor13, %p048  %xor15 = xor i64 %xor14, %q049  %xor16 = xor i64 %xor15, 150  %xor17 = xor i64 %xor16, 151  ret i64 %xor1752}53 54; Calling each (non-)inlining function twice to make sure they won't get the sole call inlining cost bonus. 55define i64 @Caller(ptr noundef %in) {56entry:57  %arrayidx = getelementptr inbounds i64, ptr %in, i64 058  %a0 = load i64, ptr %arrayidx, align 459  %arrayidx1 = getelementptr inbounds i64, ptr %in, i64 160  %b0 = load i64, ptr %arrayidx1, align 461  %arrayidx2 = getelementptr inbounds i64, ptr %in, i64 262  %c0 = load i64, ptr %arrayidx2, align 463  %arrayidx3 = getelementptr inbounds i64, ptr %in, i64 364  %d0 = load i64, ptr %arrayidx3, align 465  %arrayidx4 = getelementptr inbounds i64, ptr %in, i64 466  %e0 = load i64, ptr %arrayidx4, align 467  %arrayidx5 = getelementptr inbounds i64, ptr %in, i64 568  %f0 = load i64, ptr %arrayidx5, align 469  %arrayidx6 = getelementptr inbounds i64, ptr %in, i64 670  %g0 = load i64, ptr %arrayidx6, align 471  %arrayidx7 = getelementptr inbounds i64, ptr %in, i64 772  %h0 = load i64, ptr %arrayidx7, align 473  %arrayidx8 = getelementptr inbounds i64, ptr %in, i64 874  %i0 = load i64, ptr %arrayidx8, align 475  %arrayidx9 = getelementptr inbounds i64, ptr %in, i64 976  %j0 = load i64, ptr %arrayidx9, align 477  %arrayidx10 = getelementptr inbounds i64, ptr %in, i64 1078  %k0 = load i64, ptr %arrayidx10, align 479  %arrayidx11 = getelementptr inbounds i64, ptr %in, i64 1180  %l0 = load i64, ptr %arrayidx11, align 481  %arrayidx12 = getelementptr inbounds i64, ptr %in, i64 1282  %m0 = load i64, ptr %arrayidx12, align 483  %arrayidx13 = getelementptr inbounds i64, ptr %in, i64 1384  %n0 = load i64, ptr %arrayidx13, align 485  %arrayidx14 = getelementptr inbounds i64, ptr %in, i64 1486  %o0 = load i64, ptr %arrayidx14, align 487  %arrayidx15 = getelementptr inbounds i64, ptr %in, i64 1588  %p0 = load i64, ptr %arrayidx15, align 489  %arrayidx16 = getelementptr inbounds i64, ptr %in, i64 1690  %q0 = load i64, ptr %arrayidx16, align 491  %noinlinecall1 = call noundef i64 @non_inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0)92  %add = add i64 0, %noinlinecall193  %noinlinecall2 = call noundef i64 @non_inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0)94  %add2 = add i64 %add, %noinlinecall295  %inlinecall1 = call noundef i64 @inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0, i64 noundef %q0)96  %add3 = add i64 %add2, %inlinecall197  %inlinecall2 = call noundef i64 @inlining_call(i64 noundef %a0, i64 noundef %b0, i64 noundef %c0, i64 noundef %d0, i64 noundef %e0, i64 noundef %f0, i64 noundef %g0, i64 noundef %h0, i64 noundef %i0, i64 noundef %j0, i64 noundef %k0, i64 noundef %l0, i64 noundef %m0, i64 noundef %n0, i64 noundef %o0, i64 noundef %p0, i64 noundef %q0)98  %add4 = add i64 %add3, %inlinecall299  ret i64 %add4100}101