Refined Input, Degraded Output: The Counterintuitive World of Compiler Behavior (Video, PLDI 2024) Theodoros Theodoridis and Zhendong Su (ETH Zurich, Switzerland; ETH Zurich, Switzerland) Abstract: To optimize a program, a compiler needs precise information about it. Significant effort is dedicated to improving the ability of compilers to analyze programs, with the expectation that more information results in better optimization. But this assumption does not always hold: due to unexpected interactions between compiler components and phase ordering issues, sometimes more information leads to worse optimization. This can lead to wasted research and engineering effort whenever compilers cannot efficiently leverage additional information. In this work, we systematically examine the extent to which additional information can be detrimental to compilers. We consider two types of information: dead code, i.e., whether a program location is unreachable, and value ranges, i.e., the possible values a variable can take at a specific program location. Given a seed program, we refine it with additional information and check whether this degrades the output. Based on this approach, we develop a fully automated and effective testing method for identifying such issues, and through an extensive evaluation and analysis, we quantify their existence and prevalence in widely used compilers. In particular, we have reported 59 cases in GCC and LLVM, of which 55 have been confirmed or fixed so far, highlighting the practical relevance and value of our findings. This work’s fresh perspective opens up a new direction in understanding and improving compilers. Article: https://doi.org/10.1145/3656404 Supplementary archive: https://doi.org/10.5281/zenodo.10808465 (Badges: Artifacts Available, Artifacts Evaluated — Reusable) ORCID: https://orcid.org/0000-0002-0896-9997, https://orcid.org/0000-0002-2970-1391 Video Tags: Missed Compiler Optimizations, Automated Compiler Testing, pldi24main-p148-p, doi:10.1145/3656404, doi:10.5281/zenodo.10808465, orcid:0000-0002-0896-9997, orcid:0000-0002-2970-1391, Artifacts Available, Artifacts Evaluated — Reusable Presentation at the PLDI 2024 conference, June 24–28, 2024, https://pldi24.sigplan.org/ Sponsored by ACM SIGPLAN,