[PATCH] D111531: Fix minor deficiency in MachineSink.

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 05:55:59 PST 2021


markus added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/MachineSink-implicit-x0.mir:35
+...
+---
----------------
StephenTozer wrote:
> StephenTozer wrote:
> > StephenTozer wrote:
> > > markus wrote:
> > > > StephenTozer wrote:
> > > > > I've just run the test, and it seems that this last line causes a parse error for llc; otherwise the test seems to work as written.
> > > > Hmm, what exactly are you running then? 
> > > > When I run
> > > > ```
> > > > ./bin/llvm-lit ../llvm/test/CodeGen/RISCV/MachineSink-implicit-x0.mir
> > > > ```
> > > > it passes without issues.
> > > The command:
> > > ```
> > > python .\build\Release\bin\llvm-lit.py llvm\test\CodeGen\RISCV\MachineSink-implicit-x0.mir
> > > ```
> > > fails with:
> > > ```
> > > $ ":" "RUN: at line 1"
> > > $ "d:\upstream-llvm\build\release\bin\llc.exe" "-mtriple=riscv32" "D:\upstream-llvm\llvm\test\CodeGen\RISCV\MachineSink-implicit-x0.mir" "-run-pass=machine-sink" "-o" "-"
> > > # command stderr:
> > > error: YAML:35:1: not a mapping
> > > ---
> > > ^~~
> > > ```
> > > 
> > > Deleting the dashes causes it to pass. This is with python 3.9.7 and an up-to-date build of LLVM from trunk (82b74363a9).
> > Also, this is a windows build - and I've just confirmed that when running the tests on linux, the final line does not affect the test, so this is presumably platform-dependent.
> Alright, I've figured it out - when I applied the patch, the test file didn't contain the final newline, which was messing with YAML parsing. This should be fine as-is, apologies for the wasted time!
Ah, right. I was not able to reproduce on linux but I will change it anyways since I see now that it is not present in other .mir tests. Not sure where I picked it up from.

No worries. Thanks for reviewing :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111531



More information about the llvm-commits mailing list