================ @@ -1562,7 +1562,9 @@ unsigned LoongArchAsmParser::checkTargetMatchPredicate(MCInst &Inst) { unsigned Opc = Inst.getOpcode(); switch (Opc) { default: - if (Opc >= LoongArch::AMADD_D && Opc <= LoongArch::AMXOR_W) { + // amcas[_db].{b/h/w/d} didn't need this judgement + if ((Opc >= LoongArch::AMADD_B && Opc <= LoongArch::AMAND__DB_W) || + (Opc >= LoongArch::AMMAX_D && Opc <= LoongArch::AMXOR__DB_W)) { ---------------- tangaac wrote:
> Ah. This is very prone to breakage as correct operation relies on the order > of insn definitions in the TableGen files. I think so. After v1.1 instructions added, AMADD_B has the smallest opc because of dictionary order. While AMXOR__DB_W already has the largest opc, not AMXOR_W. The previous code should be a bug. https://github.com/llvm/llvm-project/pull/114189 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits