[ModuloSchedule] removeBranch() *before* creating the trip count condition
authorJames Molloy <jmolloy@google.com>
Thu, 3 Oct 2019 17:10:32 +0000 (17:10 +0000)
committerJames Molloy <jmolloy@google.com>
Thu, 3 Oct 2019 17:10:32 +0000 (17:10 +0000)
commit9972c992ebeee3fba63141ac8e3db46e2117cb7d
treef7b7876fabef5f0bcecb62e840a44b2668c57979
parentb44204c77e63fcb02af46a9cf830fa23ac4cfc64
[ModuloSchedule] removeBranch() *before* creating the trip count condition

The Hexagon code assumes there's no existing terminator when inserting its
trip count condition check.

This causes swp-stages5.ll to break. The generated code looks good to me,
it is likely a permutation. I have disabled the new codegen path to keep
everything green and will investigate along with the other 3-4 tests
that have different codegen.

Fixes expensive-checks build.

llvm-svn: 373629
llvm/lib/CodeGen/ModuloSchedule.cpp
llvm/test/CodeGen/Hexagon/swp-stages5.ll