[Attributor] Check violation of returned position nonnull and noundef attribute in...
authorShinji Okumura <okuraofvegetable@gmail.com>
Fri, 7 Aug 2020 02:40:53 +0000 (11:40 +0900)
committerShinji Okumura <okuraofvegetable@gmail.com>
Fri, 7 Aug 2020 03:02:42 +0000 (12:02 +0900)
commitf13f2e16f00e8d23b49b0dfc58d63adc052d0222
tree13f7c2fd7ef606c3afae0343183d38f7c06d15f0
parent39cbcbe1b1e58cbc51755522f69d1c9d43fc709f
[Attributor] Check violation of returned position nonnull and noundef attribute in AAUndefinedBehavior

This patch is a follow up of D84733.
If a function has noundef attribute in returned position, instructions that return undef or poison value cause UB.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85178
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/undefined_behavior.ll