[llvm] Add support for single reductions in ComplexDeinterleavingPass (PR #112875)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun May 11 13:29:41 PDT 2025


================
@@ -1556,13 +1726,41 @@ void ComplexDeinterleavingGraph::identifyReductionNodes() {
         break;
       }
     }
+
+    auto *Real = OperationInstruction[i];
+    // We want to check that we have 2 operands, but the function attributes
+    // being counted as operands bloats this value.
+    if (Real->getNumOperands() < 2)
----------------
fhahn wrote:

Looks like we are missing a check to ensure we only have integer types here. With FP types, we currently crash due to creating `llvm.reduce.add` reductions for floating point types. It also doesn't check for the rigth FP flags AFAICT.

Put up https://github.com/llvm/llvm-project/pull/139469 to bail out

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


More information about the llvm-commits mailing list