[llvm] [GVN] Teach GVN simple masked load/store forwarding (PR #157689)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 03:27:35 PDT 2025
================
@@ -36,6 +36,152 @@ define <128 x i8> @f1(ptr %a0, <128 x i8> %a1, <128 x i8> %a2) {
ret <128 x i8> %v4
}
-declare <128 x i8> @llvm.masked.load.v128i8.p0(ptr, i32, <128 x i1>, <128 x i8>)
-declare void @llvm.masked.store.v128i8.p0(<128 x i8>, ptr, i32, <128 x i1>)
+define <4 x float> @forward_masked_load(ptr %0, ptr %1) {
----------------
david-arm wrote:
Might be worth having a test for an arbitrary mask as well that's passed in as a function argument, i.e. we can apply the optimisation even if the mask isn't known to come from get.active.lane.mask.
https://github.com/llvm/llvm-project/pull/157689
More information about the llvm-commits
mailing list