================
@@ -1158,12 +1158,15 @@ class LLVM_ABI MachineFunction {
                                           int64_t Offset, LLT Ty);
   MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO,
                                           int64_t Offset, LocationSize Size) {
-    return getMachineMemOperand(
-        MMO, Offset,
-        !Size.isPrecise() ? LLT()
-        : Size.isScalable()
-            ? LLT::scalable_vector(1, 8 * Size.getValue().getKnownMinValue())
-            : LLT::scalar(8 * Size.getValue().getKnownMinValue()));
+    if (!Size.isPrecise())
+      return getMachineMemOperand(MMO, Offset, LLT());
+
+    unsigned SizeInBits = 8 * Size.getValue().getKnownMinValue();
+    LLT Ty = Size.isScalable() ? LLT::scalable_vector(1, SizeInBits)
+             : MMO->getType().isPointerOrPointerVector()
+                 ? LLT::scalar(SizeInBits)
----------------
petar-avramovic wrote:

now that I think about it, this should really be LLT::integer

https://github.com/llvm/llvm-project/pull/196398
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to