[all-commits] [llvm/llvm-project] 34d35d: [ValueTracking] fix miscompile in maxnum case of c...

RotateRight via All-commits all-commits at lists.llvm.org
Tue Jul 14 05:08:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 34d35d4a42dc747345cea4a8b7066371a70cf7a8
      https://github.com/llvm/llvm-project/commit/34d35d4a42dc747345cea4a8b7066371a70cf7a8
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstCombine/copysign.ll
    M llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
    M llvm/test/Transforms/InstSimplify/floating-point-compare.ll

  Log Message:
  -----------
  [ValueTracking] fix miscompile in maxnum case of cannotBeOrderedLessThanZeroImpl (PR46627)

A miscompile with -0.0 is shown in:
http://bugs.llvm.org/PR46627

This is because maxnum(-0.0, +0.0) does not specify a fixed result:
http://llvm.org/docs/LangRef.html#llvm-maxnum-intrinsic

So we need to tighten the constraints for when it is ok to say the
result of maxnum is positive (including +0.0).

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




More information about the All-commits mailing list