Skip to content

[NFC][VPlan] Trim extra spaces in VPDerivedIVRecipe::print during debugging #106041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

sunshaoce
Copy link
Contributor

before:

    EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%8>
    vp<%4>    = DERIVED-IV ir<%n> + vp<%3> * ir<-1>
    vp<%5> = SCALAR-STEPS vp<%4>, ir<-1>

after:

    EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%8>
    vp<%4> = DERIVED-IV ir<%n> + vp<%3> * ir<-1>
    vp<%5> = SCALAR-STEPS vp<%4>, ir<-1>

@llvmbot
Copy link
Member

llvmbot commented Aug 26, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Shao-Ce SUN (sunshaoce)

Changes

before:

    EMIT vp&lt;%3&gt; = CANONICAL-INDUCTION ir&lt;0&gt;, vp&lt;%8&gt;
    vp&lt;%4&gt;    = DERIVED-IV ir&lt;%n&gt; + vp&lt;%3&gt; * ir&lt;-1&gt;
    vp&lt;%5&gt; = SCALAR-STEPS vp&lt;%4&gt;, ir&lt;-1&gt;

after:

    EMIT vp&lt;%3&gt; = CANONICAL-INDUCTION ir&lt;0&gt;, vp&lt;%8&gt;
    vp&lt;%4&gt; = DERIVED-IV ir&lt;%n&gt; + vp&lt;%3&gt; * ir&lt;-1&gt;
    vp&lt;%5&gt; = SCALAR-STEPS vp&lt;%4&gt;, ir&lt;-1&gt;

Full diff: https://github.com/llvm/llvm-project/pull/106041.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp (+1-1)
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index fe1325f4163004..53b28a692059f6 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -1455,7 +1455,7 @@ void VPDerivedIVRecipe::print(raw_ostream &O, const Twine &Indent,
                               VPSlotTracker &SlotTracker) const {
   O << Indent;
   printAsOperand(O, SlotTracker);
-  O << Indent << "= DERIVED-IV ";
+  O << " = DERIVED-IV ";
   getStartValue()->printAsOperand(O, SlotTracker);
   O << " + ";
   getOperand(1)->printAsOperand(O, SlotTracker);

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@fhahn
Copy link
Contributor

fhahn commented Aug 26, 2024

(for the title, might be good VP -> VPlan to avoid confusion with VP intrinsics)

@sunshaoce sunshaoce changed the title [NFC][VP] Trim extra spaces in VPDerivedIVRecipe::print during debugging [NFC][VPlan] Trim extra spaces in VPDerivedIVRecipe::print during debugging Aug 26, 2024
@sunshaoce sunshaoce merged commit 2f0d326 into llvm:main Aug 26, 2024
11 checks passed
@sunshaoce sunshaoce deleted the trim branch August 26, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants