[all-commits] [llvm/llvm-project] 7ad3bb: Reapply [ValueLattice] Fix getCompare() for undef ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Nov 2 02:26:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ad3bb527e25eb0a9d147d2e93f9dca605c75688
      https://github.com/llvm/llvm-project/commit/7ad3bb527e25eb0a9d147d2e93f9dca605c75688
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueLattice.h
    M llvm/lib/Transforms/Utils/SCCPSolver.cpp
    M llvm/unittests/Analysis/ValueLatticeTest.cpp

  Log Message:
  -----------
  Reapply [ValueLattice] Fix getCompare() for undef values

Relative to the previous attempt, this also updates the
ValueLattice unit tests.

-----

Resolve the TODO about incorrect getCompare() behavior. This can
be made more precise (e.g. by materializing the undef value and
performing constant folding on it), but for now just return an
unknown result to fix the correctness issue.

This should be NFC in terms of user-visible behavior, because the
only user of this method (SCCP) was already guarding against
UndefValue results.




More information about the All-commits mailing list