[llvm] [AArch64][GlobalISel] Support udot lowering for vecreduce add (PR #70784)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 00:37:38 PDT 2023
================
@@ -228,6 +228,146 @@ void applyFoldGlobalOffset(MachineInstr &MI, MachineRegisterInfo &MRI,
B.buildConstant(LLT::scalar(64), -static_cast<int64_t>(MinOffset)));
}
+// Combines vecreduce_add(mul(ext, ext)) -> vecreduce_add(udot)
+// Or vecreduce_add(ext) -> vecreduce_add(ext)
+// Similar to performVecReduceAddCombine in SelectionDAG
+bool matchExtAddvToUdotAddv(MachineInstr &MI, MachineRegisterInfo &MRI) {
+ assert(MI.getOpcode() == TargetOpcode::G_VECREDUCE_ADD &&
----------------
davemgreen wrote:
Can you add an assert that Subtarget->hadDotProd()
https://github.com/llvm/llvm-project/pull/70784
More information about the llvm-commits
mailing list