29 lines · plain
1; RUN: opt < %s -passes=inline,instcombine -S | FileCheck %s2 3; PR22857: http://llvm.org/bugs/show_bug.cgi?id=228574; The inliner should not add an edge to an intrinsic and5; then assert that it did not add an edge to an intrinsic!6 7define float @foo(float %f1) {8 %call = call float @bar(float %f1)9 ret float %call10 11; CHECK-LABEL: @foo(12; CHECK-NEXT: call fast float @llvm.fabs.f3213; CHECK-NEXT: ret float14}15 16define float @bar(float %f1) {17 %call = call float @sqr(float %f1)18 %call1 = call fast float @sqrtf(float %call)19 ret float %call120}21 22define float @sqr(float %f) {23 %mul = fmul fast float %f, %f24 ret float %mul25}26 27declare float @sqrtf(float)28 29