[llvm] [InstCombine] Remove over-generalization from computeKnownBitsFromCmp() (PR #72637)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 14:19:18 PST 2023


goldsteinn wrote:

> > I see. That seems like a reasonable motivation. Although I'd think a few simple cases (like `X == Y`) would provide enough value to justify the cost.
> 
> The `X == Y` case exists for completeness more than anything: For plain equalities, GVN will replace `X` with `Y` (or vice versa), independently of whether `Y` is constant.

Ahh, you're right. Good point.

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


More information about the llvm-commits mailing list