[all-commits] [llvm/llvm-project] f74a33: [ConstantFolding] add undef handling for fmin/fmax...

RotateRight via All-commits all-commits at lists.llvm.org
Sat Sep 19 07:31:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f74a334fe35bcea08a48f76462782f0eafc6d564
      https://github.com/llvm/llvm-project/commit/f74a334fe35bcea08a48f76462782f0eafc6d564
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-09-19 (Sat, 19 Sep 2020)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/fp-undef.ll

  Log Message:
  -----------
  [ConstantFolding] add undef handling for fmin/fmax intrinsics

The output here may not be optimal (yet), but it should be
consistent for commuted operands (it was not before) and
correct. We can do better by checking FMF and NaN if needed.

Code in InstSimplify generally assumes that we have already
folded code like this, so it was not handling 2 constant
inputs by commuting consistently.




More information about the All-commits mailing list