[llvm] [InstCombine] Reuse existing freeze when pushing freeze through a binop (PR #202306)
Yuyang Zhang via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 00:10:00 PDT 2026
yuyzhang512 wrote:
> Perhaps:
>
> ```
> diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
> index 608966a5e928..568202d9f892 100644
> --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
> +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
> @@ -5394,6 +5394,10 @@ bool InstCombinerImpl::freezeOtherUses(FreezeInst &FI) {
> });
>
> for (auto *U : Users) {
> + auto *UI = cast<Instruction>(U);
> + Worklist.pushUsersToWorkList(*UI);
> + Worklist.push(UI);
> +
> for (auto &AssumeVH : AC.assumptionsFor(U)) {
> if (!AssumeVH)
> continue;
> ```
I agree, this is better. Changed.
https://github.com/llvm/llvm-project/pull/202306
More information about the llvm-commits
mailing list