[llvm] [InstSimplify] Fold `getelementptr inbounds null, idx -> null` (PR #130742)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 10:59:24 PDT 2025


dtcxzyw wrote:

> Is there a real-world optimization benefit derived from this fold? Or is it just added because it's an obviously-correct simplification?

See https://github.com/llvm/llvm-project/pull/130734#issue-2909626525 and https://github.com/dtcxzyw/llvm-opt-benchmark/pull/2204/files. This patch is useful to eliminate unreachable code introduced by passes like JumpThreading.



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


More information about the llvm-commits mailing list