43 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck %s3target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"4target triple = "aarch64"5 6define <vscale x 4 x float> @scalable_vec_exp(<vscale x 4 x float> %input) {7; CHECK-LABEL: define <vscale x 4 x float> @scalable_vec_exp(8; CHECK-SAME: <vscale x 4 x float> [[INPUT:%.*]]) {9; CHECK-NEXT: [[TMP1:%.*]] = call i64 @llvm.vscale.i64()10; CHECK-NEXT: [[TMP2:%.*]] = mul nuw i64 [[TMP1]], 411; CHECK-NEXT: br label %[[BB3:.*]]12; CHECK: [[BB3]]:13; CHECK-NEXT: [[TMP4:%.*]] = phi i64 [ 0, [[TMP0:%.*]] ], [ [[TMP9:%.*]], %[[BB3]] ]14; CHECK-NEXT: [[TMP5:%.*]] = phi <vscale x 4 x float> [ [[INPUT]], [[TMP0]] ], [ [[TMP8:%.*]], %[[BB3]] ]15; CHECK-NEXT: [[TMP6:%.*]] = extractelement <vscale x 4 x float> [[TMP5]], i64 [[TMP4]]16; CHECK-NEXT: [[TMP7:%.*]] = call float @llvm.exp.f32(float [[TMP6]])17; CHECK-NEXT: [[TMP8]] = insertelement <vscale x 4 x float> [[TMP5]], float [[TMP7]], i64 [[TMP4]]18; CHECK-NEXT: [[TMP9]] = add i64 [[TMP4]], 119; CHECK-NEXT: [[TMP10:%.*]] = icmp eq i64 [[TMP9]], [[TMP2]]20; CHECK-NEXT: br i1 [[TMP10]], label %[[BB11:.*]], label %[[BB3]]21; CHECK: [[BB11]]:22; CHECK-NEXT: ret <vscale x 4 x float> [[TMP8]]23;24 %output = call <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float> %input)25 ret <vscale x 4 x float> %output26}27 28define <4 x float> @fixed_vec_exp(<4 x float> %input) {29; CHECK-LABEL: define <4 x float> @fixed_vec_exp(30; CHECK-SAME: <4 x float> [[INPUT:%.*]]) {31; CHECK-NEXT: [[OUTPUT:%.*]] = call <4 x float> @llvm.exp.v4f32(<4 x float> [[INPUT]])32; CHECK-NEXT: ret <4 x float> [[OUTPUT]]33;34 %output = call <4 x float> @llvm.exp.v4f32(<4 x float> %input)35 ret <4 x float> %output36}37 38declare <4 x float> @llvm.exp.v4f32(<4 x float>) #039declare <vscale x 4 x float> @llvm.exp.nxv4f32(<vscale x 4 x float>) #040 41; CHECK: attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }42attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }43