[llvm-dev] LSR tests failing under new pass manager due to not being in LCSSA form

Arthur Eubanks via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 9 10:54:00 PST 2020


In an effort to turn on the new pass manager by default, I've been trying
to make all lit tests pass when opt uses the new pass manager. (Change the
default value of -enable-new-pm in opt.cpp to true to repro)

A good chunk of the remaining failures are some loop pass tests, mostly
LSR, that are failing. The legacy PM does not by default run LCSSA before
running loop passes, but the new PM does that. These tests are failing
because the original test file is not in LCSSA form, so running LCSSA
before something like -loop-reduce changes the input to LSR. This can be
repro'd under the legacy PM by changing the test to also run `-lcssa`. One
example is llvm/test/Transforms/LoopStrengthReduce/uglygep.ll (RUN: opt <
%s -lcssa -loop-reduce -S | FileCheck %s).

Any thoughts on how to fix these 30-35 tests? Manually convert them to
LCSSA form and update the CHECK lines? Seems tricky, especially for
somebody without much experience with these passes. Some of these do use
update_test_checks, but some do not.
Another option is to add an option to disable running LCSSA, but that
doesn't seem right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201109/15d54ad6/attachment.html>


More information about the llvm-dev mailing list