Miscompilation bugs in GVN.cpp and PromoteMemoryToRegister.cpp?

Dear llvm-dev,

Hi! We’re collecting mis-compilation bugs in gvn and mem2reg since 3.7.1. Specifically, We’re interested in bugs in the following files:

llvm/lib/Transforms/Scalar/GVN.cpp

llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp

We checked all reports in the LLVM bugzilla (https://bugs.llvm.org/), so I’d like to ask if you know any such a bug that is not reported in the bugzilla.

Thanks,
Jeehoon Kang

3.7 was released over two years ago; there have been many bugfixes to both GVN and the analysis passes it depends on since then. Do you have some idea of what, specifically, you’re looking for? mem2reg is a very simple pass; I would be surprised if you found miscompile bug in it. -Eli

There are definitely a few miscompile bugs floating around in the edge cases of mem2reg.

Dear llvm-dev,

Hi! We're collecting mis-compilation bugs in gvn and mem2reg since
3.7.1. Specifically, We're interested in bugs in the following files:

llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp

3.7 was released over two years ago; there have been many bugfixes to
both GVN and the analysis passes it depends on since then. Do you have
some idea of what, specifically, you're looking for?

mem2reg is a very simple pass; I would be surprised if you found
miscompile bug in it.

There are definitely a few miscompile bugs floating around in the edge
cases of mem2reg.

Here's one: https://bugs.llvm.org/show_bug.cgi?id=36578

First of all, thank you for your input :slight_smile: As many of you said, my question was somewhat vague. I’d like to clarify what we want to know, and what we did.

We’re enumerating all the miscompilation bugs in the mem2reg and gvn passes (but not in the analysis passes they depend on), which was discovered after the release of LLVM 3.7.1 (5th Jan 2016).
That’s why I specifically asked about the bugs in GVN.cpp and PromoteMemoryToRegister.cpp.

In order to know that, we searched “sroa”, “mem2reg”, “PromoteMemoryToRegister”, and “gvn” in the LLVM bugzilla.
By manually inspecting the entire search result, we could find a handful of such bugs.

However, searching bugzilla may miss some bugs. A bug may not be reported in the bugzilla, but be patched in the trunk directly.
We’d like to know whether there are such bugs.

So I’d like to ask if you know any miscompilation bug that is (1) in PromoteMemoryToRegister.cpp or GVN.cpp; (2) discovered after the release of LLVM 3.7.1; and (3) not reported in the LLVM bugzilla.

I’m sorry that I asked a vague question. I hope this email clarifies my question. Also thank you again for valuable comments!

Best,
Jeehoon