[all-commits] [llvm/llvm-project] c4fc2c: [instcombine] umin(x, 1) == zext(x != 0)

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Jun 30 10:20:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4fc2cb5b2d98125e9035d9498640c7d6f17c8da
      https://github.com/llvm/llvm-project/commit/c4fc2cb5b2d98125e9035d9498640c7d6f17c8da
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-06-30 (Wed, 30 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/minmax-intrinsics.ll

  Log Message:
  -----------
  [instcombine] umin(x, 1) == zext(x != 0)

We already implemented this for the select form, but the intrinsic form was missing.  Note that this doesn't change poison behavior as 1 is non-poison, and the optimized form is still poison exactly when x is.




More information about the All-commits mailing list