[Mlir-commits] [mlir] [mlir][Vector] Update VectorEmulateNarrowType.cpp (2/N) (PR #123527)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 20 19:40:57 PST 2025
================
@@ -282,13 +282,15 @@ emulatedVectorLoad(OpBuilder &rewriter, Location loc, Value base,
OpFoldResult linearizedIndices,
int64_t numEmultedElementsToLoad, Type origElemType,
Type emulatedElemType) {
- auto scale = emulatedElemType.getIntOrFloatBitWidth() /
- origElemType.getIntOrFloatBitWidth();
+ auto elementsPerContainerType = emulatedElemType.getIntOrFloatBitWidth() /
+ origElemType.getIntOrFloatBitWidth();
auto newLoad = rewriter.create<vector::LoadOp>(
loc, VectorType::get(numEmultedElementsToLoad, emulatedElemType), base,
getValueOrCreateConstantIndexOp(rewriter, loc, linearizedIndices));
return rewriter.create<vector::BitCastOp>(
- loc, VectorType::get(numEmultedElementsToLoad * scale, origElemType),
+ loc,
+ VectorType::get(numEmultedElementsToLoad * elementsPerContainerType,
----------------
lialan wrote:
typo in `numEmultedElementsToLoad` ?
https://github.com/llvm/llvm-project/pull/123527
More information about the Mlir-commits
mailing list