[llvm] [AArch64][FEAT_CMPBR] Codegen for Armv9.6-a compare-and-branch (PR #116465)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 04:19:21 PST 2025
================
@@ -543,6 +569,17 @@ bool AArch64InstrInfo::reverseBranchCondition(
case AArch64::TBNZX:
Cond[1].setImm(AArch64::TBZX);
break;
+
+ // Cond is { -1, Opcode, CC, Op0, Op1 }
+ case AArch64::CBWPri:
+ case AArch64::CBXPri:
+ case AArch64::CBWPrr:
+ case AArch64::CBXPrr: {
+ // Pseudos using standard 4bit Arm condition codes
+ AArch64CC::CondCode CC =
+ static_cast<AArch64CC::CondCode>(Cond[2].getImm());
+ Cond[2].setImm(AArch64CC::getInvertedCondCode(CC));
----------------
SpencerAbson wrote:
Thank you, quite an annoying problem! I don't think we can do much better than being conservative, as you say, but maybe it's best to leave this open in case someone can offer an idea.
https://github.com/llvm/llvm-project/pull/116465
More information about the llvm-commits
mailing list