Index: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp =================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2566,10 +2566,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 std::make_shared(II, 1); + error("Constant int or bit argument should not have a name!"); + if (isa(TheInit)) + TheInit = TheInit->convertInitializerTo(IntRecTy::get()); + return std::make_shared(TheInit, 1); } if (BitsInit *BI = dyn_cast(TheInit)) {