Allow 'constant' op to work with affineint, add some accessors, rearrange
testsuite a bit.
PiperOrigin-RevId: 205852871
diff --git a/lib/IR/StandardOps.cpp b/lib/IR/StandardOps.cpp
index cb03db7..1307b2a 100644
--- a/lib/IR/StandardOps.cpp
+++ b/lib/IR/StandardOps.cpp
@@ -43,7 +43,7 @@
return "requires a 'value' attribute";
auto *type = this->getType();
- if (isa<IntegerType>(type)) {
+ if (isa<IntegerType>(type) || type->isAffineInt()) {
if (!isa<IntegerAttr>(value))
return "requires 'value' to be an integer for an integer result type";
return nullptr;