Fuzzing loop optimizations in compilers for C++ and data-parallel languages

Vsevolod Livinskii, Dmitry Babokin, John Regehr
[doi] [Google Scholar] [DBLP] [Citeseer] [url]

Proc. ACM Program. Lang. 7(PLDI)
Association for Computing Machinery
New York, NY, USA
jun 2023
Note(s): fuzz testing, loop fusion

Fuzzing is an effective way of finding compiler bugs but it has been hard to use them to find bugs in complex optimization passes such as loop optimizations because these optimizations only trigger in particular circumstances that random programs rarely satisfy.

This paper avoids these problems by identifying a number of common templates that will trigger loop optimizations and generating loops using these templates. As usual when fuzzing compilers, a key part is avoiding generating programs with undefined behavior.

Using this, they found 122 bugs in compilers.