[llvm] 887ed6d - [AArch64][GlobalISel] Remove mulh c++ lowering (#81105)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 11 03:20:56 PST 2024
Author: David Green
Date: 2024-02-11T11:20:53Z
New Revision: 887ed6d2876156ade8a382e521130feae4b91b82
URL: https://github.com/llvm/llvm-project/commit/887ed6d2876156ade8a382e521130feae4b91b82
DIFF: https://github.com/llvm/llvm-project/commit/887ed6d2876156ade8a382e521130feae4b91b82.diff
LOG: [AArch64][GlobalISel] Remove mulh c++ lowering (#81105)
I believe these should be selectable via tablegen patterns nowadays.
Added:
Modified:
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Removed:
################################################################################
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