[ArgPromotion] Require noundef to copy poison-generating metadata
authorNikita Popov <npopov@redhat.com>
Wed, 5 Apr 2023 12:33:11 +0000 (14:33 +0200)
committerNikita Popov <npopov@redhat.com>
Wed, 5 Apr 2023 12:34:33 +0000 (14:34 +0200)
commitb066505d8835e263e19c13f2cd718b6eb8db4470
treea86e4a8f20e282bd56a94c7ab046b19fc4a97bfe
parentcc89ebe2b9230f34831176ada8876dff3fffc24b
[ArgPromotion] Require noundef to copy poison-generating metadata

For poison-generating (rather than IUB) metadata, only copy it
from the dominating must-exec load if it is combined with !noundef.
This could be further extended by additionall intersecting the
metadata from all loads, which does not require !noundef.
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/test/Transforms/ArgumentPromotion/metadata.ll