[llvm] Reapply [TLI] Fix replace-with-veclib crash with invalid arguments (PR #77945)

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 10:33:20 PST 2024


pranavk wrote:

We figured out the problem I reported earlier. The problem is that your patch makes use of global variable llvm::DebugFlag = true which makes other tests that are built as part of same binary to execute in debug mode as well. One of the tests, ConstraintSystemTest.cpp for example starts executing its debug code (in Dump()) which leads to an assertion failure. This was the reason my internal bisect pointed to this commit.

So there are two things:
1. Maybe you could avoid using global state llvm::DebugFlag = true? I don't see that to be the norm doing a quick search in the repo. Or perhaps there's a better way to handle this.
2. Thanks for exposing the bug in ConstraintSystemTest.cpp. I will file a bug report for that.

https://github.com/llvm/llvm-project/pull/77945


More information about the llvm-commits mailing list