================ @@ -2142,84 +2159,44 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, - SmallVectorImpl<Intrinsic *> &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHECK\n"; +void NeonEmitter::genNeonImmCheckTypes(raw_ostream &OS) { + OS << "#ifdef GET_NEON_IMMCHECKTYPES\n"; + + for (auto *RV : Records.getAllDerivedDefinitions("ImmCheckType")) { + OS << " " << RV->getNameInitAsString() << " = " + << RV->getValueAsInt("Value") << ",\n"; + } + + OS << "#endif\n\n"; +} +void NeonEmitter::genIntrinsicRangeCheckCode( + raw_ostream &OS, SmallVectorImpl<Intrinsic *> &Defs) { + OS << "#ifdef GET_NEON_IMMEDIATE_CHECK\n"; + int EltType; + // Ensure these are only emitted once. std::set<std::string> Emitted; - for (auto *Def : Defs) { - if (Def->hasBody()) - continue; - // Functions which do not have an immediate do not need to have range - // checking code emitted. - if (!Def->hasImmediate()) - continue; - if (Emitted.find(Def->getMangledName()) != Emitted.end()) + for (auto &Def : Defs) { + if (Emitted.find(Def->getMangledName()) != Emitted.end() || + !Def->hasImmediate()) ---------------- SpencerAbson wrote:
Added now https://github.com/llvm/llvm-project/pull/100278 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits