[llvm] [TTI] Use MemIntrinsicCostAttributes for getExpandCompressMemoryOpCost (PR #168677)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 06:36:40 PST 2025


================
@@ -125,12 +125,20 @@ struct HardwareLoopInfo {
 
 /// Information for memory intrinsic cost model.
 class MemIntrinsicCostAttributes {
+  /// Optional context instruction, if one exists, e.g. the
+  /// load/store to transform to the intrinsic.
+  const Instruction *I = nullptr;
+
   /// Vector type of the data to be loaded or stored.
   Type *DataTy = nullptr;
 
   /// ID of the memory intrinsic.
   Intrinsic::ID IID;
 
+  /// True when the memory access is predicated with a mask
+  /// that is not a compile-time constant.
+  bool VariableMask = true;
----------------
lukel97 wrote:

Should this default to false?

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


More information about the llvm-commits mailing list