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) {
1587
1587
mlir::isa_and_nonnull<cir::ConstVectorAttr>(indices)) {
1588
1588
auto vecAttr = mlir::cast<cir::ConstVectorAttr>(vec);
1589
1589
auto indicesAttr = mlir::cast<cir::ConstVectorAttr>(indices);
1590
- auto vecTy = cast<cir::VectorType>(vecAttr.getType ());
1590
+ auto vecTy = mlir:: cast<cir::VectorType>(vecAttr.getType ());
1591
1591
1592
1592
mlir::ArrayAttr vecElts = vecAttr.getElts ();
1593
1593
mlir::ArrayAttr indicesElts = indicesAttr.getElts ();
@@ -1598,9 +1598,8 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
1598
1598
elements.reserve (numElements);
1599
1599
1600
1600
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 ();
1604
1603
uint64_t newIdx = idxValue & maskBits;
1605
1604
elements.push_back (vecElts[newIdx]);
1606
1605
}
You can’t perform that action at this time.
0 commit comments