Skip to content

Commit 48229b7

Browse files
authored
[LAYOUTS] Ensure that we are consistent about what indices are constant (#7308)
1 parent b188033 commit 48229b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Conversion/TritonGPUToLLVM/Utility.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ applyLinearLayout(Location loc, RewriterBase &rewriter,
216216
}
217217

218218
for (auto [inDimName, idx] : indices) {
219-
if (idx.getDefiningOp<LLVM::ConstantOp>()) {
219+
APInt constant;
220+
if (matchPattern(idx, m_ConstantInt(&constant))) {
220221
continue;
221222
}
222-
223223
int nBits = layout.getInDimSizeLog2(inDimName);
224224
for (int i = 0; i < nBits; i++) {
225225
Value bit = b.and_(idx, b.i32_val(1 << i));

0 commit comments

Comments
 (0)