[test][InstCombine] Add tests for removing memcpy to an alloca that is passed to...
authorPatrick Walton <pcwalton@fb.com>
Sun, 30 Oct 2022 02:03:29 +0000 (19:03 -0700)
committerPatrick Walton <pcwalton@fb.com>
Sun, 30 Oct 2022 09:45:49 +0000 (02:45 -0700)
commit86c95dca5c1b09d4184e90c18a53fe6384d94fba
tree0eb32a29644c8b0e69b234ddd9618fd7bdd069cf
parentcb2cb2d201811d95d4f35337817faea05654d8f0
[test][InstCombine] Add tests for removing memcpy to an alloca that is passed to a readonly nocapture function parameter, in preparation for D136822.

This commit adds tests to Transforms/InstCombine/memcpy-from-global.ll that
test various situations involving memcpy from a constant to an alloca that is
then passed to function parameters with various attributes. The forthcoming
D136822 allows InstCombine to remove these memcpys if they're passed to a
single readonly nocapture parameter.

Differential Revision: https://reviews.llvm.org/D137033
llvm/test/Transforms/InstCombine/memcpy-from-global.ll