[llvm] [GISel][AArch64] Reuse LHS and RHS in emitFPCompare instead of calling getReg() (NFC) (PR #155263)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 08:52:00 PDT 2025
https://github.com/AZero13 created https://github.com/llvm/llvm-project/pull/155263
None
>From ac2d6da511f8715cbc6cfa7a4378f1fc1f0b136c Mon Sep 17 00:00:00 2001
From: AZero13 <gfunni234 at gmail.com>
Date: Mon, 25 Aug 2025 11:51:23 -0400
Subject: [PATCH] [GISel][AArch64] Reuse LHS and RHS in emitFPCompare instead
of calling getReg() (NFC)
---
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
index 0bceb322726d1..0aefce8d32b2c 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
@@ -4875,8 +4875,7 @@ MachineInstr *AArch64InstructionSelector::emitConjunctionRec(
auto Dst = MRI.cloneVirtualRegister(LHS);
if (isa<GICmp>(Cmp))
return emitSUBS(Dst, Cmp->getOperand(2), Cmp->getOperand(3), MIB);
- return emitFPCompare(Cmp->getOperand(2).getReg(),
- Cmp->getOperand(3).getReg(), MIB);
+ return emitFPCompare(LHS, RHS, MIB, CC);
}
// Otherwise produce a ccmp.
return emitConditionalComparison(LHS, RHS, CC, Predicate, OutCC, MIB);
More information about the llvm-commits
mailing list