[llvm] [IR] Add getDataLayout() helpers to Function and GlobalValue (PR #96919)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 08:56:48 PDT 2024


================
@@ -21043,7 +21043,7 @@ bool ARMTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
   case Intrinsic::arm_neon_vld4dup: {
     Info.opc = ISD::INTRINSIC_W_CHAIN;
     // Conservatively set memVT to the entire set of vectors loaded.
-    auto &DL = I.getCalledFunction()->getParent()->getDataLayout();
+    auto &DL = I.getCalledFunction()->getDataLayout();
----------------
dtcxzyw wrote:

```suggestion
    auto &DL = I.getDataLayout();
```

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


More information about the llvm-commits mailing list