[llvm] [InstCombine] Don't assert on samesign ule/uge of sext (PR #216079)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 10:00:17 PDT 2026


================
@@ -6602,8 +6602,13 @@ Instruction *InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) {
 
   // Is source op negative?
   // icmp ugt (sext X), C --> icmp slt X, 0
-  assert(ICmp.getPredicate() == ICmpInst::ICMP_UGT && "ICmp should be folded!");
-  return new ICmpInst(CmpInst::ICMP_SLT, X, Constant::getNullValue(SrcTy));
+  if (ICmp.getPredicate() == ICmpInst::ICMP_UGT)
----------------
dtcxzyw wrote:

Drop InstCombine changes.

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


More information about the llvm-commits mailing list