[llvm] [CodeGen][NFC] Compute MaximumLegalStoreInBits just once (PR #189355)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 04:42:41 PDT 2026


================
@@ -1939,6 +1939,13 @@ void TargetLoweringBase::computeRegisterProperties(
     RepRegClassForVT[i] = RRC;
     RepRegClassCostForVT[i] = Cost;
   }
+
+  // Compute minimum known-legal store size.
+  MaximumLegalStoreInBits = 0;
+  for (MVT VT : MVT::all_valuetypes())
+    if (EVT(VT).isSimple() && VT != MVT::Other && isTypeLegal(EVT(VT)) &&
----------------
aengelke wrote:

Well.. I just copied the code. Removed casts and isSimple().

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


More information about the llvm-commits mailing list