[llvm] [InstCombine] Narrow signed min/max DAGs before truncation (PR #218688)

KIM MYEONG SEOK via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 08:05:53 PDT 2026


mangsgi wrote:

The existing canEvaluateTruncated path rejects this DAG before reaching the sext leaves, because ComputeMaxSignificantBits() reports the intermediate min/max operands at the wide width.

I handled it separately so that the structural check and the no-external-users restriction remain local to this fold, without broadening the general canEvaluateTruncated logic. However, I don't think separate handling is fundamentally required. I'll check whether the existing path can be extended cleanly instead.

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


More information about the llvm-commits mailing list