[all-commits] [llvm/llvm-project] 9d92f4: Reapply [InstSimplify] Support all instructions in...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Apr 25 06:45:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d92f479c3fb708ea0cad8aa6fa70fd46f753123
      https://github.com/llvm/llvm-project/commit/9d92f479c3fb708ea0cad8aa6fa70fd46f753123
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-04-25 (Tue, 25 Apr 2023)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/select-maxmin.ll

  Log Message:
  -----------
  Reapply [InstSimplify] Support all instructions in simplifyWithOpReplaced()

Relative to the previous attempt, this includes a bailout for phi
nodes, whose arguments might refer to a previous cycle iteration.

We did not hit this before by a fortunate deficiency of the
ConstantFoldInstOperands() API, which doesn't handle phi nodes,
unlike ConstantFoldInstruction().

-----

Instead of hardcoding a few instruction kinds, use the generic
interface now that we have it.

The primary effect of this is that intrinsics are now supported.

It's worth noting that this is still limited in that it does not
support vectors, so we can't remove e.g. existing fshl special
cases.




More information about the All-commits mailing list