[llvm] [AArch64][GlobalISel] Remove mulh c++ lowering (PR #81105)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 00:44:47 PST 2024
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/81105
I believe these should be selectable via tablegen patterns nowadays.
>From 712c6d0c883143848667d22d8b99703faf2dc017 Mon Sep 17 00:00:00 2001
From: David Green <david.green at arm.com>
Date: Thu, 8 Feb 2024 08:42:04 +0000
Subject: [PATCH] [AArch64][GlobalISel] Remove mulh c++ lowering
These should be selectable via tablegen patterns nowadays.
---
.../GISel/AArch64InstructionSelector.cpp | 28 -------------------
1 file changed, 28 deletions(-)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
index 2515991fbea114..9d51a7f7616ddb 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
@@ -3020,34 +3020,6 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
case TargetOpcode::G_INDEXED_STORE:
return selectIndexedStore(cast<GIndexedStore>(I), MRI);
- case TargetOpcode::G_SMULH:
- case TargetOpcode::G_UMULH: {
- // Reject the various things we don't support yet.
- if (unsupportedBinOp(I, RBI, MRI, TRI))
- return false;
-
- const Register DefReg = I.getOperand(0).getReg();
- const RegisterBank &RB = *RBI.getRegBank(DefReg, MRI, TRI);
-
- if (RB.getID() != AArch64::GPRRegBankID) {
- LLVM_DEBUG(dbgs() << "G_[SU]MULH on bank: " << RB << ", expected: GPR\n");
- return false;
- }
-
- if (Ty != LLT::scalar(64)) {
- LLVM_DEBUG(dbgs() << "G_[SU]MULH has type: " << Ty
- << ", expected: " << LLT::scalar(64) << '\n');
- return false;
- }
-
- unsigned NewOpc = I.getOpcode() == TargetOpcode::G_SMULH ? AArch64::SMULHrr
- : AArch64::UMULHrr;
- I.setDesc(TII.get(NewOpc));
-
- // Now that we selected an opcode, we need to constrain the register
- // operands to use appropriate classes.
- return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
- }
case TargetOpcode::G_LSHR:
case TargetOpcode::G_ASHR:
if (MRI.getType(I.getOperand(0).getReg()).isVector())
More information about the llvm-commits
mailing list