khchen added inline comments.
================ Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:1052 uint8_t PrevExt = (*Defs.begin())->getRISCV_Extensions(); - bool NeedEndif = emitExtDefStr(PrevExt, OS); + bool NeedEndif = + (*Defs.begin())->hasAutoDef() ? emitExtDefStr(PrevExt, OS) : false; ---------------- craig.topper wrote: > It doesn't make sense to me to skip the emitExtDefStr for !hasAutoDef. The > intrinsics without a definition are still sorted with the others. If they > happen to have non-zero extensions and on the boundary of the different > extension regions in the sorted list we still need to manage the #if/#endif > for that boundary. You are right, thanks for catch bug! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96843/new/ https://reviews.llvm.org/D96843 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits