[all-commits] [llvm/llvm-project] d68d21: [InstCombine] Fold `ucmp/scmp(x, y) >> N` to `zext...

Volodymyr Vasylkun via All-commits all-commits at lists.llvm.org
Thu Aug 15 10:08:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d68d2172f9f1f0659b8b4bdbbeb1ccd290a614b5
      https://github.com/llvm/llvm-project/commit/d68d2172f9f1f0659b8b4bdbbeb1ccd290a614b5
  Author: Volodymyr Vasylkun <vvmposeydon at gmail.com>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    A llvm/test/Transforms/InstCombine/lshr-ashr-of-uscmp.ll

  Log Message:
  -----------
  [InstCombine] Fold `ucmp/scmp(x, y) >> N` to `zext/sext(x < y)` when N is one less than the width of the result of `ucmp/scmp` (#104009)

Proof: https://alive2.llvm.org/ce/z/4diUqN

---------

Co-authored-by: Nikita Popov <github at npopov.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list