[llvm] [AArch64][GlobalISel] Remove mulh c++ lowering (PR #81105)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 00:45:20 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: David Green (davemgreen)
<details>
<summary>Changes</summary>
I believe these should be selectable via tablegen patterns nowadays.
---
Full diff: https://github.com/llvm/llvm-project/pull/81105.diff
1 Files Affected:
- (modified) llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp (-28)
``````````diff
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
index 2515991fbea11..9d51a7f7616dd 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())
``````````
</details>
https://github.com/llvm/llvm-project/pull/81105
More information about the llvm-commits
mailing list