[llvm] [AMDGPU] Implement vop3p complex pattern optmization for gisel (PR #130234)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 9 20:06:11 PDT 2025
================
@@ -4282,44 +4282,364 @@ AMDGPUInstructionSelector::selectVOP3NoMods(MachineOperand &Root) const {
}};
}
-std::pair<Register, unsigned>
-AMDGPUInstructionSelector::selectVOP3PModsImpl(
- Register Src, const MachineRegisterInfo &MRI, bool IsDOT) const {
- unsigned Mods = 0;
- MachineInstr *MI = MRI.getVRegDef(Src);
+enum srcStatus {
+ IS_SAME,
+ IS_UPPER_HALF,
+ IS_LOWER_HALF,
+ IS_NEG,
+ IS_UPPER_HALF_NEG,
+ IS_LOWER_HALF_NEG,
+ LAST_STAT = IS_LOWER_HALF_NEG
+};
+
+bool isTruncHalf(MachineInstr *MI, const MachineRegisterInfo &MRI) {
----------------
arsenm wrote:
```suggestion
static bool isTruncHalf(MachineInstr *MI, const MachineRegisterInfo &MRI) {
```
https://github.com/llvm/llvm-project/pull/130234
More information about the llvm-commits
mailing list