[Mlir-commits] [mlir] [MLIR] Fix `BubbleDownVectorBitCastForExtract` crash on non-static index (PR #116518)
Han-Chung Wang
llvmlistbot at llvm.org
Mon Nov 18 09:57:16 PST 2024
================
@@ -596,12 +596,11 @@ struct BubbleDownVectorBitCastForExtract
unsigned expandRatio =
castDstType.getNumElements() / castSrcType.getNumElements();
- auto getFirstIntValue = [](ArrayRef<OpFoldResult> values) -> uint64_t {
- assert(values[0].is<Attribute>() && "Unexpected non-constant index");
- return cast<IntegerAttr>(values[0].get<Attribute>()).getInt();
- };
-
- uint64_t index = getFirstIntValue(extractOp.getMixedPosition());
+ // Get the first element of the mixed position as integer
----------------
hanhanW wrote:
nit: add a period at the end of the sentence.
https://github.com/llvm/llvm-project/pull/116518
More information about the Mlir-commits
mailing list