在 2023/11/14 下午4:34, Xi Ruoyao 写道: > On Tue, 2023-11-14 at 10:26 +0800, chenglulu wrote: >> Hi, >> >> >>  * Before calling this template, the function get_memmodel is called to process memmodel, which has a piece of code: >> >>        /* Workaround for Bugzilla 59448. GCC doesn't track consume properly, so >>         be conservative and promote consume to acquire. */ >>      if (val == MEMMODEL_CONSUME) >>        val = MEMMODEL_ACQUIRE; >> >>  * So I think MEMMODEL_CONSUME don't need to be processed here either. >> >> >> Otherwise is OK. > Thanks, I've removed case MEMMODEL_CONSUME and there seems no issue. > RISC-V mem_thread_fence expansion also does not handle MEMMODEL_CONSUME. > > Pushed r14-5432 with case MEMMODEL_CONSUME removed and comment adjusted, > as attached. > > But curiously there are various references to MEMMODEL_CONSUME in > gcc/config: > > $ grep -lr MEMMODEL_CONSUME gcc/config > gcc/config/aarch64/aarch64.cc > gcc/config/riscv/riscv.cc > gcc/config/ia64/ia64.cc > gcc/config/ia64/sync.md > gcc/config/gcn/gcn.md > gcc/config/loongarch/loongarch.cc > gcc/config/rs6000/rs6000.cc > gcc/config/rs6000/sync.md > gcc/config/nvptx/nvptx.cc > > Maybe all of them are redundant? > I think so.:-) *