[PATCH] D153808: [CodeGen] Add support for integers using SVE2 in ComplexDeinterleaving passDepends on D153355

Igor Kirillov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 06:29:56 PDT 2023


igor.kirillov added inline comments.


================
Comment at: llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp:970
 
-  FastMathFlags Flags = Real->getFastMathFlags();
-  if (!Flags.allowReassoc()) {
-    LLVM_DEBUG(
-        dbgs() << "the 'Reassoc' attribute is missing in the FastMath flags\n");
-    return nullptr;
+  if (Flags) {
+    if (Real->getFastMathFlags() != Imag->getFastMathFlags()) {
----------------
mgabka wrote:
> wouldn't be more clear to guard it by if(isa<FPMathOperator>(Real)) ?
> 
> 
> on the same from do we need to have a check somewhere that Real and Imag are of the same type? i.e both fp or integer?
By design, they should not have different types, but after reading your comment, I realised I missed a check inside identifyReductions. So, I created a patch to fix that:
https://reviews.llvm.org/D153862


================
Comment at: llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp:1027-1029
+        if (isNeg(I)) {
+          Worklist.emplace_back(getNegOperand(I), !IsPositive);
+        } else {
----------------
mgabka wrote:
> looking at the diff this looks like a new functionality, maybe worth to add it as a separate patch?
That is part of integer support functionality, namely when we have a Neg operation, for example, c = - a * b;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153808/new/

https://reviews.llvm.org/D153808



More information about the llvm-commits mailing list