Finding Bugs in MLIR Compiler Infrastructure via Lowering Space Exploration

Abstract

MLIR is a widely adopted compiler infrastructure that supports multi-level IRs and reusable components. Ensuring its correctness is critical, as bugs can propagate to downstream systems. MLIR provides a lowering mechanism that transforms high-level programs into low-level representations through configurable sequences of passes, and allows multiple valid lowering paths for a given program. This gives rise to a lowering equivalence property: all valid lowering paths for the same MLIR program should produce semantically equivalent results. In this paper, we leverage this property and propose lowering space exploration, to effectively test the MLIR infrastructure. Our approach dynamically constructs diverse lowering paths in an adaptive, stepwise manner using a feedback-based scheduling mechanism. It finds bugs by comparing the execution results across these paths. Any inconsistencies indicate potential bugs in the MLIR infrastructure. To the best of our knowledge, this is the first work to test MLIR from the perspective of exploring its compilation space. We implement our approach in a tool named LOBE and evaluate it on latest MLIR versions. LOBE discovers 38 previously unknown bugs, including 8 miscompilations and 30 crash bugs, with 25 confirmed/fixed.

Date
Oct 28, 2025 4:00 PM — 5:00 PM
Event
Weekly Talk
Location
COM3-B1-15 - Meeting Rm 92

Speaker Info:

Jingjing Liang is a Postdoctoral Fellow at East China Normal University, working with Prof. Ting Su. She received her Ph.D. degree in Computer Science from Peking University, under the supervision of Prof. Yingfei Xiong, and her B.S. degree in Software Engineering from East China Normal University.

Her research interests lie in software engineering, particularly in software testing, fault localization, and program repair. Her recent work centers on compiler testing and the use of AI-driven techniques to improve the effectiveness and intelligence of testing processes.