You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[RISCV] Sink vp.splat operands of VP intrinsic. (#133245)
This patch introduces a `vp.splat` matching method for VP support by
sinking the `vp.splat` operand of VP operations back into the same basic
block as the VP operation, facilitating the generation of .vx
instructions to reduce vector register pressure.
---------
Co-authored-by: yanming <ming.yan@terapines.com>
%vector.phi = phi <vscale x 8 x i32> [ %vp.splat1, %vector.body ], [ %vp.binary26, %for.body424 ]
5941
+
%arrayidx625 = getelementptrinbounds [1024 x i32], ptr%in, i64%scalar.phi, i64%scalar.ind
5942
+
%widen.load = tailcall <vscale x 8 x i32> @llvm.vp.load.nxv8i32.p0(ptr%arrayidx625, <vscale x 8 x i1> splat (i1true), i32%evl)
5943
+
%vp.binary = tailcall <vscale x 8 x i32> @llvm.vp.mul.nxv8i32(<vscale x 8 x i32> %widen.load, <vscale x 8 x i32> %vp.splat2, <vscale x 8 x i1> splat (i1true), i32%evl)
5944
+
%vp.binary26 = tailcall <vscale x 8 x i32> @llvm.vp.add.nxv8i32(<vscale x 8 x i32> %vector.phi, <vscale x 8 x i32> %vp.binary, <vscale x 8 x i1> splat (i1true), i32%evl)
%arrayidx620 = getelementptrinbounds [1024 x double], ptr%in, i64%scalar.phi, i64%scalar.ind
6006
+
%widen.load = call <vscale x 8 x double> @llvm.vp.load.nxv8f64.p0(ptr%arrayidx620, <vscale x 8 x i1> splat (i1true), i32%evl)
6007
+
%vp.binary = call <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double> %widen.load, <vscale x 8 x double> %vp.splat, <vscale x 8 x i1> splat (i1true), i32%evl)
6008
+
callvoid@llvm.vp.store.nxv8f64.p0(<vscale x 8 x double> %vp.binary, ptr%arrayidx620, <vscale x 8 x i1> splat (i1true), i32%evl)
0 commit comments