Index: utils/TableGen/CodeGenDAGPatterns.cpp =================================================================== --- utils/TableGen/CodeGenDAGPatterns.cpp +++ utils/TableGen/CodeGenDAGPatterns.cpp @@ -2572,10 +2572,12 @@ return Res; } - if (IntInit *II = dyn_cast(TheInit)) { + if (isa(TheInit) || isa(TheInit)) { if (!OpName.empty()) - error("Constant int argument should not have a name!"); - return new TreePatternNode(II, 1); + error("Constant int or bit argument should not have a name!"); + if (isa(TheInit)) + TheInit = TheInit->convertInitializerTo(IntRecTy::get()); + return new TreePatternNode(TheInit, 1); } if (BitsInit *BI = dyn_cast(TheInit)) {