[llvm] [LSR] Deduplicate cast instructions across ICmpZero fixups (PR #201970)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 06:11:17 PDT 2026


nikic wrote:

> I've seen this happen in SPEC sealcrypto (the test added here is reduced from that case). Without this optimization, LSR can produce multiple equivalent casts, and later simplifyInstruction can't fold the icmp because its operands end up being different cast instructions.

And the sealcrypto case would *not* be covered by not emitting inttoptr at all?

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


More information about the llvm-commits mailing list