[ArgPromotion] Check dereferenceability on argument as well
authorNikita Popov <npopov@redhat.com>
Tue, 8 Feb 2022 09:29:51 +0000 (10:29 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 8 Feb 2022 09:29:51 +0000 (10:29 +0100)
commitb896334834305c8b68b9b6e6cb4386adb4ed1a07
treea25efd264957e0e6054b5a1ec3ff66b5d6980379
parentc2b476767ef327396868050a08aa1192d3e4ba81
[ArgPromotion] Check dereferenceability on argument as well

Before walking all the callers, check whether we have a
dereferenceable attribute directly on the argument.

Also make it clearer that the code currently does not treat
alignment correctly.
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/test/Transforms/ArgumentPromotion/align.ll