File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1587,7 +1587,7 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
15871587 mlir::isa_and_nonnull<cir::ConstVectorAttr>(indices)) {
15881588 auto vecAttr = mlir::cast<cir::ConstVectorAttr>(vec);
15891589 auto indicesAttr = mlir::cast<cir::ConstVectorAttr>(indices);
1590- auto vecTy = cast<cir::VectorType>(vecAttr.getType ());
1590+ auto vecTy = mlir:: cast<cir::VectorType>(vecAttr.getType ());
15911591
15921592 mlir::ArrayAttr vecElts = vecAttr.getElts ();
15931593 mlir::ArrayAttr indicesElts = indicesAttr.getElts ();
@@ -1598,9 +1598,8 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
15981598 elements.reserve (numElements);
15991599
16001600 const uint64_t maskBits = llvm::NextPowerOf2 (numElements - 1 ) - 1 ;
1601- for (const mlir::APInt &idxAttr :
1602- indicesElts.getAsValueRange <cir::IntAttr, mlir::APInt>()) {
1603- uint64_t idxValue = idxAttr.getZExtValue ();
1601+ for (const auto &idxAttr : indicesElts.getAsRange <cir::IntAttr>()) {
1602+ uint64_t idxValue = idxAttr.getUInt ();
16041603 uint64_t newIdx = idxValue & maskBits;
16051604 elements.push_back (vecElts[newIdx]);
16061605 }
You can’t perform that action at this time.
0 commit comments