Skip to main navigation Skip to search Skip to main content

Finding Bugs in MLIR Compiler Infrastructure via Lowering Space Exploration

  • Jingjing Liang
  • , Shan Huang
  • , Ting Su*
  • *Corresponding author for this work
  • East China Normal University
  • Nanjing University

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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.

Original languageEnglish
Title of host publicationProceedings - 2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages636-647
Number of pages12
ISBN (Electronic)9798350357332
DOIs
StatePublished - 2025
Event2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025 - Seoul, Korea, Republic of
Duration: 16 Nov 202520 Nov 2025

Publication series

NameProceedings - 2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025

Conference

Conference2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025
Country/TerritoryKorea, Republic of
CitySeoul
Period16/11/2520/11/25

Fingerprint

Dive into the research topics of 'Finding Bugs in MLIR Compiler Infrastructure via Lowering Space Exploration'. Together they form a unique fingerprint.

Cite this