[all-commits] [llvm/llvm-project] 0f2c18: [ValueTracking] Implement impliesPoison

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Mon Dec 28 13:55:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f2c180163a2cc3d6239a32d379ec3d773e56a2f
      https://github.com/llvm/llvm-project/commit/0f2c180163a2cc3d6239a32d379ec3d773e56a2f
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2020-12-29 (Tue, 29 Dec 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueTracking.h
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [ValueTracking] Implement impliesPoison

This PR adds impliesPoison(ValAssumedPoison, V) that returns true if V is
poison under the assumption that ValAssumedPoison is poison.

For example, impliesPoison('icmp X, 10', 'icmp X, Y') return true because
'icmp X, Y' is poison if 'icmp X, 10' is poison.

impliesPoison can be used for sound optimization of select, as discussed in
D77868.

Reviewed By: nikic

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




More information about the All-commits mailing list