[llvm] [SystemZ] Add custom handling of legal vectors with reduce-add. (PR #88495)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 04:20:34 PDT 2024


================
@@ -444,6 +446,11 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
       setOperationAction(ISD::SRL, VT, Custom);
       setOperationAction(ISD::ROTL, VT, Custom);
 
+      // Add ISD::VECREDUCE_ADD as custom in order to implement
+      // it with VZERO+VSUM
+      if (Subtarget.hasVector()) {
----------------
uweigand wrote:

I don't think we need this check - this whole block is executed only if the vector type is "legal", which pre-supposes "hasVector".

https://github.com/llvm/llvm-project/pull/88495


More information about the llvm-commits mailing list