}
void print(Module *module);
- void printAttributeAndType(Attribute attr) {
- printAttributeOptionalType(attr, /*includeType=*/true);
- }
- void printAttribute(Attribute attr) {
- printAttributeOptionalType(attr, /*includeType=*/false);
- }
+
+ /// Print the given attribute. If 'mayElideType' is true, some attributes are
+ /// printed without the type when the type matches the default used in the
+ /// parser (for example i64 is the default for integer attributes).
+ void printAttribute(Attribute attr, bool mayElideType = false);
void printType(Type type);
void print(Function *fn);
void printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
ArrayRef<StringRef> elidedAttrs = {});
- void printAttributeOptionalType(Attribute attr, bool includeType);
void printTrailingLocation(Location loc);
void printLocationInternal(LocationAttr loc, bool pretty = false);
void printDenseElementsAttr(DenseElementsAttr attr);
os << "<\"" << symString << "\">";
}
-void ModulePrinter::printAttributeOptionalType(Attribute attr,
- bool includeType) {
+void ModulePrinter::printAttribute(Attribute attr, bool mayElideType) {
if (!attr) {
os << "<<NULL ATTRIBUTE>>";
return;
break;
case StandardAttributes::Bool:
os << (attr.cast<BoolAttr>().getValue() ? "true" : "false");
- break;
+
+ // BoolAttr always elides the type.
+ return;
case StandardAttributes::Dictionary:
os << '{';
interleaveComma(attr.cast<DictionaryAttr>().getValue(),
bool isSigned = intAttr.getType().isIndex() ||
intAttr.getType().getIntOrFloatBitWidth() != 1;
intAttr.getValue().print(os, isSigned);
- // Print the type.
- if (includeType) {
- os << " : ";
- printType(intAttr.getType());
- }
+
+ // IntegerAttr elides the type if I64.
+ if (mayElideType && intAttr.getType().isInteger(64))
+ return;
break;
}
case StandardAttributes::Float: {
auto floatAttr = attr.cast<FloatAttr>();
printFloatValue(floatAttr.getValue(), os);
- // Print the type.
- if (includeType) {
- os << " : ";
- printType(floatAttr.getType());
- }
+
+ // FloatAttr elides the type if F64.
+ if (mayElideType && floatAttr.getType().isF64())
+ return;
break;
}
case StandardAttributes::String:
break;
case StandardAttributes::Array:
os << '[';
- interleaveComma(attr.cast<ArrayAttr>().getValue(),
- [&](Attribute attr) { printAttribute(attr); });
+ interleaveComma(attr.cast<ArrayAttr>().getValue(), [&](Attribute attr) {
+ printAttribute(attr, /*mayElideType=*/true);
+ });
os << ']';
break;
case StandardAttributes::AffineMap:
attr.cast<AffineMapAttr>().getValue().print(os);
- break;
+
+ // AffineMap always elides the type.
+ return;
case StandardAttributes::IntegerSet:
attr.cast<IntegerSetAttr>().getValue().print(os);
break;
case StandardAttributes::OpaqueElements: {
auto eltsAttr = attr.cast<OpaqueElementsAttr>();
os << "opaque<\"" << eltsAttr.getDialect()->getNamespace() << "\", ";
- os << '"' << "0x" << llvm::toHex(eltsAttr.getValue()) << "\"> : ";
- printType(eltsAttr.getType());
+ os << '"' << "0x" << llvm::toHex(eltsAttr.getValue()) << "\">";
break;
}
case StandardAttributes::DenseElements: {
auto eltsAttr = attr.cast<DenseElementsAttr>();
os << "dense<";
printDenseElementsAttr(eltsAttr);
- os << "> : ";
- printType(eltsAttr.getType());
+ os << '>';
break;
}
case StandardAttributes::SparseElements: {
printDenseElementsAttr(elementsAttr.getIndices());
os << ", ";
printDenseElementsAttr(elementsAttr.getValues());
- os << "> : ";
- printType(elementsAttr.getType());
+ os << '>';
break;
}
printLocation(attr.cast<LocationAttr>());
break;
}
+
+ // Print the type if it isn't a 'none' type.
+ auto attrType = attr.getType();
+ if (!attrType.isa<NoneType>()) {
+ os << " : ";
+ printType(attrType);
+ }
+}
+
+/// Print the integer element of the given DenseElementsAttr at 'index'.
+static void printDenseIntElement(DenseElementsAttr attr, raw_ostream &os,
+ unsigned index) {
+ APInt value = *std::next(attr.getIntValues().begin(), index);
+ value.print(os, /*isSigned=*/value.getBitWidth() != 1);
+}
+
+/// Print the float element of the given DenseElementsAttr at 'index'.
+static void printDenseFloatElement(DenseElementsAttr attr, raw_ostream &os,
+ unsigned index) {
+ APFloat value = *std::next(attr.getFloatValues().begin(), index);
+ printFloatValue(value, os);
}
void ModulePrinter::printDenseElementsAttr(DenseElementsAttr attr) {
auto shape = type.getShape();
auto rank = type.getRank();
- SmallVector<Attribute, 16> elements;
- attr.getValues(elements);
+ // The function used to print elements of this attribute.
+ auto printEltFn = type.getElementType().isa<IntegerType>()
+ ? printDenseIntElement
+ : printDenseFloatElement;
// Special case for 0-d and splat tensors.
if (attr.isSplat()) {
- printAttribute(elements[0]);
+ printEltFn(attr, os, 0);
return;
}
// Special case for degenerate tensors.
- if (elements.empty()) {
+ auto numElements = type.getNumElements();
+ if (numElements == 0) {
for (int i = 0; i < rank; ++i)
os << '[';
for (int i = 0; i < rank; ++i)
}
};
- for (unsigned idx = 0, e = elements.size(); idx != e; ++idx) {
+ for (unsigned idx = 0, e = numElements; idx != e; ++idx) {
if (idx != 0)
os << ", ";
while (openBrackets++ < rank)
os << '[';
openBrackets = rank;
- printAttribute(elements[idx]);
+ printEltFn(attr, os, idx);
bumpCounter();
}
while (openBrackets-- > 0)
return;
os << " = ";
- printAttributeAndType(attr.second);
+ printAttribute(attr.second);
});
os << '}';
}
void printAttribute(Attribute attr) override {
ModulePrinter::printAttribute(attr);
}
- void printAttributeAndType(Attribute attr) override {
- ModulePrinter::printAttributeAndType(attr);
- }
void printOperand(Value *value) override { printValueID(value); }
void printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
void Attribute::print(raw_ostream &os) const {
ModuleState state(/*no context is known*/ nullptr);
- ModulePrinter(os, state).printAttributeAndType(*this);
+ ModulePrinter(os, state).printAttribute(*this);
}
void Attribute::dump() const {
// CHECK-NEXT: %5 = llvm.call @malloc(%4) : (!llvm.i64) -> !llvm<"i8*">
// CHECK-NEXT: %6 = llvm.bitcast %5 : !llvm<"i8*"> to !llvm<"float*">
// CHECK-NEXT: %7 = llvm.undef : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %8 = llvm.insertvalue %6, %7[0] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %9 = llvm.insertvalue %arg0, %8[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %10 = llvm.insertvalue %arg1, %9[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %8 = llvm.insertvalue %6, %7[0 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %9 = llvm.insertvalue %arg0, %8[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %10 = llvm.insertvalue %arg1, %9[2 : index] : !llvm<"{ float*, i64, i64 }">
%0 = alloc(%arg0, %arg1) : memref<?x42x?xf32>
return %0 : memref<?x42x?xf32>
}
// CHECK-LABEL: func @mixed_dealloc(%arg0: !llvm<"{ float*, i64, i64 }">) {
func @mixed_dealloc(%arg0: memref<?x42x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %1 = llvm.bitcast %0 : !llvm<"float*"> to !llvm<"i8*">
// CHECK-NEXT: llvm.call @free(%1) : (!llvm<"i8*">) -> ()
dealloc %arg0 : memref<?x42x?xf32>
// CHECK-NEXT: %3 = llvm.call @malloc(%2) : (!llvm.i64) -> !llvm<"i8*">
// CHECK-NEXT: %4 = llvm.bitcast %3 : !llvm<"i8*"> to !llvm<"float*">
// CHECK-NEXT: %5 = llvm.undef : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %6 = llvm.insertvalue %4, %5[0] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %7 = llvm.insertvalue %arg0, %6[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %8 = llvm.insertvalue %arg1, %7[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %6 = llvm.insertvalue %4, %5[0 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %7 = llvm.insertvalue %arg0, %6[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %8 = llvm.insertvalue %arg1, %7[2 : index] : !llvm<"{ float*, i64, i64 }">
%0 = alloc(%arg0, %arg1) : memref<?x?xf32>
return %0 : memref<?x?xf32>
}
// CHECK-LABEL: func @dynamic_dealloc(%arg0: !llvm<"{ float*, i64, i64 }">) {
func @dynamic_dealloc(%arg0: memref<?x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %1 = llvm.bitcast %0 : !llvm<"float*"> to !llvm<"i8*">
// CHECK-NEXT: llvm.call @free(%1) : (!llvm<"i8*">) -> ()
dealloc %arg0 : memref<?x?xf32>
// CHECK-LABEL: func @mixed_load
func @mixed_load(%mixed : memref<42x?xf32>, %i : index, %j : index) {
// CHECK-NEXT: %0 = llvm.constant(42 : index) : !llvm.i64
-// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %2 = llvm.mul %arg1, %1 : !llvm.i64
// CHECK-NEXT: %3 = llvm.add %2, %arg2 : !llvm.i64
-// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %5 = llvm.getelementptr %4[%3] : (!llvm<"float*">, !llvm.i64) -> !llvm<"float*">
// CHECK-NEXT: %6 = llvm.load %5 : !llvm<"float*">
%0 = load %mixed[%i, %j] : memref<42x?xf32>
// CHECK-LABEL: func @dynamic_load
func @dynamic_load(%dynamic : memref<?x?xf32>, %i : index, %j : index) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %1 = llvm.extractvalue %arg0[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %1 = llvm.extractvalue %arg0[2 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %2 = llvm.mul %arg1, %1 : !llvm.i64
// CHECK-NEXT: %3 = llvm.add %2, %arg2 : !llvm.i64
-// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %5 = llvm.getelementptr %4[%3] : (!llvm<"float*">, !llvm.i64) -> !llvm<"float*">
// CHECK-NEXT: %6 = llvm.load %5 : !llvm<"float*">
%0 = load %dynamic[%i, %j] : memref<?x?xf32>
// CHECK-LABEL: func @dynamic_store
func @dynamic_store(%dynamic : memref<?x?xf32>, %i : index, %j : index, %val : f32) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %1 = llvm.extractvalue %arg0[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %1 = llvm.extractvalue %arg0[2 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %2 = llvm.mul %arg1, %1 : !llvm.i64
// CHECK-NEXT: %3 = llvm.add %2, %arg2 : !llvm.i64
-// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %5 = llvm.getelementptr %4[%3] : (!llvm<"float*">, !llvm.i64) -> !llvm<"float*">
// CHECK-NEXT: llvm.store %arg3, %5 : !llvm<"float*">
store %val, %dynamic[%i, %j] : memref<?x?xf32>
// CHECK-LABEL: func @mixed_store
func @mixed_store(%mixed : memref<42x?xf32>, %i : index, %j : index, %val : f32) {
// CHECK-NEXT: %0 = llvm.constant(42 : index) : !llvm.i64
-// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %2 = llvm.mul %arg1, %1 : !llvm.i64
// CHECK-NEXT: %3 = llvm.add %2, %arg2 : !llvm.i64
-// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %4 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %5 = llvm.getelementptr %4[%3] : (!llvm<"float*">, !llvm.i64) -> !llvm<"float*">
// CHECK-NEXT: llvm.store %arg3, %5 : !llvm<"float*">
store %val, %mixed[%i, %j] : memref<42x?xf32>
// CHECK-LABEL: func @memref_cast_static_to_dynamic
func @memref_cast_static_to_dynamic(%static : memref<10x42xf32>) {
// CHECK-NEXT: %0 = llvm.undef : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %1 = llvm.insertvalue %arg0, %0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %1 = llvm.insertvalue %arg0, %0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %2 = llvm.constant(10 : index) : !llvm.i64
-// CHECK-NEXT: %3 = llvm.insertvalue %2, %1[1] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %3 = llvm.insertvalue %2, %1[1 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %4 = llvm.constant(42 : index) : !llvm.i64
-// CHECK-NEXT: %5 = llvm.insertvalue %4, %3[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %5 = llvm.insertvalue %4, %3[2 : index] : !llvm<"{ float*, i64, i64 }">
%0 = memref_cast %static : memref<10x42xf32> to memref<?x?xf32>
return
}
// CHECK-LABEL: func @memref_cast_static_to_mixed
func @memref_cast_static_to_mixed(%static : memref<10x42xf32>) {
// CHECK-NEXT: %0 = llvm.undef : !llvm<"{ float*, i64 }">
-// CHECK-NEXT: %1 = llvm.insertvalue %arg0, %0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %1 = llvm.insertvalue %arg0, %0[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %2 = llvm.constant(10 : index) : !llvm.i64
-// CHECK-NEXT: %3 = llvm.insertvalue %2, %1[1] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %3 = llvm.insertvalue %2, %1[1 : index] : !llvm<"{ float*, i64 }">
%0 = memref_cast %static : memref<10x42xf32> to memref<?x42xf32>
return
}
// CHECK-LABEL: func @memref_cast_dynamic_to_static
func @memref_cast_dynamic_to_static(%dynamic : memref<?x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
%0 = memref_cast %dynamic : memref<?x?xf32> to memref<10x12xf32>
return
}
// CHECK-LABEL: func @memref_cast_dynamic_to_mixed
func @memref_cast_dynamic_to_mixed(%dynamic : memref<?x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %1 = llvm.undef : !llvm<"{ float*, i64 }">
-// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0] : !llvm<"{ float*, i64 }">
-// CHECK-NEXT: %3 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0 : index] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %3 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1 : index] : !llvm<"{ float*, i64 }">
%0 = memref_cast %dynamic : memref<?x?xf32> to memref<?x12xf32>
return
}
// CHECK-LABEL: func @memref_cast_mixed_to_dynamic
func @memref_cast_mixed_to_dynamic(%mixed : memref<42x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %1 = llvm.undef : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0 : index] : !llvm<"{ float*, i64, i64 }">
// CHECK-NEXT: %3 = llvm.constant(42 : index) : !llvm.i64
-// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1] : !llvm<"{ float*, i64, i64 }">
-// CHECK-NEXT: %5 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64 }">
-// CHECK-NEXT: %6 = llvm.insertvalue %5, %4[2] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1 : index] : !llvm<"{ float*, i64, i64 }">
+// CHECK-NEXT: %5 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %6 = llvm.insertvalue %5, %4[2 : index] : !llvm<"{ float*, i64, i64 }">
%0 = memref_cast %mixed : memref<42x?xf32> to memref<?x?xf32>
return
}
// CHECK-LABEL: func @memref_cast_mixed_to_static
func @memref_cast_mixed_to_static(%mixed : memref<42x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64 }">
%0 = memref_cast %mixed : memref<42x?xf32> to memref<42x1xf32>
return
}
// CHECK-LABEL: func @memref_cast_mixed_to_mixed
func @memref_cast_mixed_to_mixed(%mixed : memref<42x?xf32>) {
-// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %0 = llvm.extractvalue %arg0[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %1 = llvm.undef : !llvm<"{ float*, i64 }">
-// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %2 = llvm.insertvalue %0, %1[0 : index] : !llvm<"{ float*, i64 }">
// CHECK-NEXT: %3 = llvm.constant(42 : index) : !llvm.i64
-// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1] : !llvm<"{ float*, i64 }">
+// CHECK-NEXT: %4 = llvm.insertvalue %3, %2[1 : index] : !llvm<"{ float*, i64 }">
%0 = memref_cast %mixed : memref<42x?xf32> to memref<?x1xf32>
return
}
func @mixed_memref_dim(%mixed : memref<42x?x?x13x?xf32>) {
// CHECK-NEXT: %0 = llvm.constant(42 : index) : !llvm.i64
%0 = dim %mixed, 0 : memref<42x?x?x13x?xf32>
-// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1] : !llvm<"{ float*, i64, i64, i64 }">
+// CHECK-NEXT: %1 = llvm.extractvalue %arg0[1 : index] : !llvm<"{ float*, i64, i64, i64 }">
%1 = dim %mixed, 1 : memref<42x?x?x13x?xf32>
-// CHECK-NEXT: %2 = llvm.extractvalue %arg0[2] : !llvm<"{ float*, i64, i64, i64 }">
+// CHECK-NEXT: %2 = llvm.extractvalue %arg0[2 : index] : !llvm<"{ float*, i64, i64, i64 }">
%2 = dim %mixed, 2 : memref<42x?x?x13x?xf32>
// CHECK-NEXT: %3 = llvm.constant(13 : index) : !llvm.i64
%3 = dim %mixed, 3 : memref<42x?x?x13x?xf32>
-// CHECK-NEXT: %4 = llvm.extractvalue %arg0[3] : !llvm<"{ float*, i64, i64, i64 }">
+// CHECK-NEXT: %4 = llvm.extractvalue %arg0[3 : index] : !llvm<"{ float*, i64, i64, i64 }">
%4 = dim %mixed, 4 : memref<42x?x?x13x?xf32>
return
}