[all-commits] [llvm/llvm-project] 08f038: InstCombine: Fold and/or of fcmp into class

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Feb 23 02:19:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 08f0388711e49de2af54746d2d764d128dace5ce
      https://github.com/llvm/llvm-project/commit/08f0388711e49de2af54746d2d764d128dace5ce
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and-fcmp.ll
    M llvm/test/Transforms/InstCombine/create-class-from-logic-fcmp.ll

  Log Message:
  -----------
  InstCombine: Fold and/or of fcmp into class

This is motivated by patterns like !isfinite || zero. The AMDGPU math
libraries have a lot of patterns like this, and I'm trying to fix the
code to be more portable and less dependent on directly calling class
intrinsics.

I believe this is the first place where new is.fpclass calls are
introduced. There are more class-like compares that could be
recognized; this is a set I currently care about plus a few extras.

Keep the == 0 cases disabled for now. It depends on the denormal
mode. If we just check IEEE mode now, it will break my use case
without another patch I'm working on.




More information about the All-commits mailing list