[Mlir-commits] [mlir] [MLIR][LLVM][Mem2Reg] Extends support for partial stores (PR #89740)

Tobias Gysi llvmlistbot at llvm.org
Tue Apr 23 06:03:54 PDT 2024


================
@@ -170,6 +171,35 @@ static bool isBigEndian(const DataLayout &dataLayout) {
 /// The size of a byte in bits.
 constexpr const static uint64_t kBitsInByte = 8;
 
+/// Converts a value to an integer type of the same size.
+/// Assumes that the type can be converted.
+static Value convertToIntValue(RewriterBase &rewriter, Location loc, Value val,
----------------
gysit wrote:

nit: for these functions cast maybe be a better fit than convert since we really only change the type IUC? Maybe castValueToSameSizedInt / castIntValueToSameSizedType or similar. 

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


More information about the Mlir-commits mailing list