[Attributor] Reuse the IPConstantProp tests for the Attributor
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 2 Nov 2019 04:37:04 +0000 (23:37 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sat, 14 Dec 2019 04:03:26 +0000 (22:03 -0600)
commit3da7efedaa77f8fd8d40294c9e79716003517e6d
tree43a9207a730459ac01b67e6c8a3f2dd8e7e9e60f
parentad73f656b3c49f3462625ebeaec7a32f63d11d18
[Attributor] Reuse the IPConstantProp tests for the Attributor

The Attributor can, to some degree, do what IPConstantProp does. We can
consequently use the corner cases already collected and tested for in
the IPConstantProp tests to improve Attributor test coverage.

This exposed various bugs fixed in previous Attributor patches.

Not all functionality of IPConstantProp is available in AAValueSimplify
and AAIsDead so some tests show that we cannot perform the expected
constant propagation.

Reviewers: fhahn, efriedma, mssimpso, davide

Subscribers: bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69748
24 files changed:
llvm/test/Transforms/Attributor/IPConstantProp/2008-06-09-WeakProp.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/global.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/naked-return.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll [new file with mode: 0644]
llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll [new file with mode: 0644]