56 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s3; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s4 5define void @test_u() nounwind {6; CHECK-LABEL: test_u:7; CHECK: # %bb.0: # %entry8; CHECK-NEXT: #APP9; CHECK-NEXT: xvldi $xr0, 110; CHECK-NEXT: #NO_APP11; CHECK-NEXT: ret12entry:13 %0 = tail call <4 x i64> asm sideeffect "xvldi ${0:u}, 1", "=f"()14 ret void15}16 17define void @test_u_2xi64() nounwind {18; CHECK-LABEL: test_u_2xi64:19; CHECK: # %bb.0: # %entry20; CHECK-NEXT: #APP21; CHECK-NEXT: xvldi $xr0, 122; CHECK-NEXT: #NO_APP23; CHECK-NEXT: ret24entry:25 %0 = tail call <2 x i64> asm sideeffect "xvldi ${0:u}, 1", "=f"()26 ret void27}28 29define void @test_w_4xi64() nounwind {30; CHECK-LABEL: test_w_4xi64:31; CHECK: # %bb.0: # %entry32; CHECK-NEXT: #APP33; CHECK-NEXT: vldi $vr0, 134; CHECK-NEXT: #NO_APP35; CHECK-NEXT: ret36entry:37 %0 = tail call <4 x i64> asm sideeffect "vldi ${0:w}, 1", "=f"()38 ret void39}40 41define void @m128i_to_m256i(ptr %out, ptr %in) nounwind {42; CHECK-LABEL: m128i_to_m256i:43; CHECK: # %bb.0:44; CHECK-NEXT: vld $vr0, $a1, 045; CHECK-NEXT: xvrepli.b $xr1, 046; CHECK-NEXT: #APP47; CHECK-NEXT: xvpermi.q $xr1, $xr0, 3248; CHECK-NEXT: #NO_APP49; CHECK-NEXT: xvst $xr1, $a0, 050; CHECK-NEXT: ret51 %v = load <2 x i64>, ptr %in52 %x = call <4 x i64> asm sideeffect "xvpermi.q ${0:u}, ${1:u}, 32", "=f,f,0"(<2 x i64> %v, <4 x i64> zeroinitializer)53 store <4 x i64> %x, ptr %out54 ret void55}56