HomePhabricator

[ValueTracking] Add canCreateUndefOrPoison & let canCreatePoison use Operator

Authored by aqjune on Jul 19 2020, 9:23 AM.

Description

[ValueTracking] Add canCreateUndefOrPoison & let canCreatePoison use Operator

This patch

  • adds canCreateUndefOrPoison
  • refactors canCreatePoison so it can deal with constantexprs

canCreateUndefOrPoison will be used at D83926.

Reviewed By: nikic, jdoerfert

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