[all-commits] [llvm/llvm-project] 8a3efc: [ValueTracking] Consider single poison operands in...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Dec 19 03:48:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a3efcd40b48543d5b77ff9d6e0d1950847e824e
      https://github.com/llvm/llvm-project/commit/8a3efcd40b48543d5b77ff9d6e0d1950847e824e
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-12-19 (Mon, 19 Dec 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueTracking.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp
    M llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
    M llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
    M llvm/test/Analysis/ScalarEvolution/exit-count-select.ll
    M llvm/test/Analysis/ScalarEvolution/nsw.ll
    M llvm/test/Instrumentation/PoisonChecking/ub-checks.ll
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [ValueTracking] Consider single poison operands in propgatesPoison.

This patch updates propgatesPoison to take a Use as argument and
propagatesPoison now returns true if the passed in operand causes the
user to yield poison if the operand is poison

This allows propagating poison if the condition of a select is poison.
This helps improve results for programUndefinedIfUndefOrPoison.

Reviewed By: nikic

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




More information about the All-commits mailing list