[llvm] [GlobalISel] Avoid redundant copy for zero-offset GEPs (PR #203029)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 10:55:30 PDT 2026


aengelke wrote:

InstSimplifyFolder seems broken... (or rather, I probably broke it some time ago and nobody noticed). simplifyICmp -> isKnownNonEqual -> computeKnownBitsFromOperator (according to the stack trace), which assumes that some BasicBlocks have a terminator, which is typically not the case when called from an IRBuilder in Clang.

Anyhow, apart from consumer-typeset, using InstSimplifyFolder for Clang [seems to be a mixed bag](https://llvm-compile-time-tracker.com/compare.php?from=bb088f7e1a23648b56bdd91212d468f66644f94b&to=0fbca3e68eebc39ef61d958e5759f135aea35c39&stat=instructions:u). Maybe this are the calls to computeKnownBits, I don't know. Maybe InstSimplify should be more simple (would also help c-t perf in other cases, obviously a trade-off)?

https://github.com/llvm/llvm-project/pull/203029


More information about the llvm-commits mailing list