Assessing Code Understanding in LLMs
摘要
We present an empirical evaluation of Large Language Models (LLMs) in understanding semantic-preserving code transformations such as copy propagation and constant folding. Our results show that LLMs fail to recognize semantic equivalence in approximately 41% of cases without additional context, and in 29% of cases even when provided with a simple, generic context. To improve performance, we propose to integrate LLMs with code optimization tools – both to enhance training and to support deeper program comprehension.