[llvm] [GVN] Load-store forwaring of scalable store to fixed load. (PR #124748)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 05:56:12 PST 2025


================
@@ -79,14 +100,23 @@ bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
 Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
                                       IRBuilderBase &Helper,
                                       const DataLayout &DL) {
-  assert(canCoerceMustAliasedValueToLoad(StoredVal, LoadedTy, DL) &&
+  assert(canCoerceMustAliasedValueToLoad(
+             StoredVal, LoadedTy, Helper.GetInsertBlock()->getParent()) &&
----------------
nikic wrote:

Maybe pass down Function here instead of DL, like you did elsewhere?

https://github.com/llvm/llvm-project/pull/124748


More information about the llvm-commits mailing list