[all-commits] [llvm/llvm-project] 5f8c2b: [InstCombine] limit icmp fold with sub if other su...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Sat Apr 2 16:33:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f8c2b884d4288617138114ebd2fdb235452c8ce
      https://github.com/llvm/llvm-project/commit/5f8c2b884d4288617138114ebd2fdb235452c8ce
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-04-02 (Sat, 02 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-sub.ll

  Log Message:
  -----------
  [InstCombine] limit icmp fold with sub if other sub user is a phi

This is a hacky fix for:
https://github.com/llvm/llvm-project/issues/54558

As discussed there, codegen regressed when we opened up this transform
to allow extra uses ( 61580d0949fd3465 ), and it's not clear how to
undo the transforms at the later stage of compilation.

As noted in the code comments, there's a set of remaining folds that
are still limited to one-use, so we can try harder to refine and
expand the limitations on these folds, but it's likely to be an
up-and-down battle as we find and overcome similar regressions.

Differential Revision: https://reviews.llvm.org/D122909




More information about the All-commits mailing list