diff options
| author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 20:47:16 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 20:47:16 +0000 |
| commit | 8ee410c75ec416ea02dabeddd03fb062ab5dc92e (patch) | |
| tree | 4402cd576b41e4e5be8b0a4d9c3604d768e4243d /llvm/test/Transforms/FunctionAttrs/nonnull.ll | |
| parent | db6efb017f246e2492ccd00613d079de96d8f705 (diff) | |
| download | bcm5719-llvm-8ee410c75ec416ea02dabeddd03fb062ab5dc92e.tar.gz bcm5719-llvm-8ee410c75ec416ea02dabeddd03fb062ab5dc92e.zip | |
[Attributor][MemBehavior] Fallback to the function state for arguments
Even if an argument is captured, we cannot have an effect the function
does not have. This is fine except for the special case of `inalloca` as
it does not behave by the rules.
TODO: Maybe the special rule for `inalloca` is wrong after all.
llvm-svn: 374736
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/nonnull.ll')
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/nonnull.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nonnull.ll b/llvm/test/Transforms/FunctionAttrs/nonnull.ll index f893e1db889..21e5ae1f7ec 100644 --- a/llvm/test/Transforms/FunctionAttrs/nonnull.ll +++ b/llvm/test/Transforms/FunctionAttrs/nonnull.ll @@ -198,7 +198,7 @@ bb4: ; preds = %bb1 bb6: ; preds = %bb1 ; FIXME: missing nonnull. It should be @f2(i32* nonnull %arg) -; ATTRIBUTOR: %tmp7 = tail call nonnull i32* @f2(i32* %arg) +; ATTRIBUTOR: %tmp7 = tail call nonnull i32* @f2(i32* readonly %arg) %tmp7 = tail call i32* @f2(i32* %arg) ret i32* %tmp7 @@ -209,7 +209,7 @@ bb9: ; preds = %bb4, %bb define internal i32* @f2(i32* %arg) { ; FIXME: missing nonnull. It should be nonnull @f2(i32* nonnull %arg) -; ATTRIBUTOR: define internal nonnull i32* @f2(i32* %arg) +; ATTRIBUTOR: define internal nonnull i32* @f2(i32* readonly %arg) bb: ; FIXME: missing nonnull. It should be @f1(i32* nonnull readonly %arg) |

