[llvm] [InstCombine] Push freeze through non-recurrence PHIs (PR #157678)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 06:29:17 PDT 2025


c-rhodes wrote:

> I don't understand the fix you have applied. Doesn't this mean that we will now fail to freeze direct poison operands?
>
> Can you provide some more context on what causes the compile-time issue?

Sorry I admit it's not ideal, but I'm at a bit of a loss as to what to do about it. I'm seeing lots of freezes being created on direct poison operands, e.g. `OrigFI:   %.fr91682 = freeze <2 x i1> poison` (notice the number in the var name). I thought perhaps freeze is being pushed around the loop, I've tried to reduce it and found it reduces to a testcase that takes as many seconds to compile as the timeout. The best I've managed to get is two tests, one that takes 5 seconds to compile and one 10 seconds:
1. https://gist.github.com/c-rhodes/37911b2b01fe450e23f9336a736193db
2. https://gist.github.com/c-rhodes/080fa33a2ffe1ed3b82beb5557b95b92

and the 10 second one only has 31 more lines than the 5 second one and looking at the diff quite a few more PHIs: https://gist.github.com/c-rhodes/9042f77580a24df6dfcd849b55d5de64

but I'm struggling to isolate the specific issue or create a small reproducer. The previous godbolt link i shared is from llvm-reduce, but the loops and control-flow is gone.

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


More information about the llvm-commits mailing list