Returning poison from a function w/ noundef return attribute is UB
authorPhilip Reames <listmail@philipreames.com>
Wed, 6 Oct 2021 18:50:51 +0000 (11:50 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 6 Oct 2021 18:52:18 +0000 (11:52 -0700)
commit67896f494e8a310d561bc88e6890cf5c981ddc73
tree3f1ff2099b1edfc7ee55dbbfa976bb5bc27ca90c
parentf53d05135e98535543fd8edd1a0d6e5e4078c8cc
Returning poison from a function w/ noundef return attribute is UB

This does for readability of returns within said function as what we do for the caller side when reasoning about what might be poison.

Differential Revision: https://reviews.llvm.org/D111180
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Analysis/ScalarEvolution/flags-from-poison.ll