[llvm] [InstCombine] Reuse existing freeze when pushing freeze through a binop (PR #202306)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 00:06:48 PDT 2026
lijinpei-amd 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;
```
https://github.com/llvm/llvm-project/pull/202306
More information about the llvm-commits
mailing list