[llvm] [InstCombine] Don't sink if it would require dropping deref assumptions. (PR #166945)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 7 07:49:14 PST 2025


================
@@ -5413,6 +5413,18 @@ bool InstCombinerImpl::tryToSinkInstruction(Instruction *I,
         return false;
   }
 
+  // Do not sink if there are dereferenceable assumes that would be removed.
+  for (User *User : I->users()) {
----------------
dtcxzyw wrote:

Can we bail out this case in `getOptionalSinkBlockForInst`?

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


More information about the llvm-commits mailing list