35 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 62; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s3; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s4 5declare <8 x float> @llvm.log2.v8f32(<8 x float>)6declare <4 x double> @llvm.log2.v4f64(<4 x double>)7 8define void @flog2_v8f32(ptr %res, ptr %a) nounwind {9; CHECK-LABEL: flog2_v8f32:10; CHECK: # %bb.0: # %entry11; CHECK-NEXT: xvld $xr0, $a1, 012; CHECK-NEXT: xvflogb.s $xr0, $xr013; CHECK-NEXT: xvst $xr0, $a0, 014; CHECK-NEXT: ret15entry:16 %v = load <8 x float>, ptr %a17 %r = call <8 x float> @llvm.log2.v8f32(<8 x float> %v)18 store <8 x float> %r, ptr %res19 ret void20}21 22define void @flog2_v4f64(ptr %res, ptr %a) nounwind {23; CHECK-LABEL: flog2_v4f64:24; CHECK: # %bb.0: # %entry25; CHECK-NEXT: xvld $xr0, $a1, 026; CHECK-NEXT: xvflogb.d $xr0, $xr027; CHECK-NEXT: xvst $xr0, $a0, 028; CHECK-NEXT: ret29entry:30 %v = load <4 x double>, ptr %a31 %r = call <4 x double> @llvm.log2.v4f64(<4 x double> %v)32 store <4 x double> %r, ptr %res33 ret void34}35