diff options
| author | George Burgess IV <george.burgess.iv@gmail.com> | 2018-04-12 02:06:01 +0000 |
|---|---|---|
| committer | George Burgess IV <george.burgess.iv@gmail.com> | 2018-04-12 02:06:01 +0000 |
| commit | 48ee59b6f05d46a0d4996e920ca702374a979873 (patch) | |
| tree | 636c87855d5bff244ce54136eb0d809c284aea32 /llvm/test/Transforms/DeadArgElim/allocsize.ll | |
| parent | a8c689e70cc7413d5c985f9bc330804d0a0b1266 (diff) | |
| download | bcm5719-llvm-48ee59b6f05d46a0d4996e920ca702374a979873.tar.gz bcm5719-llvm-48ee59b6f05d46a0d4996e920ca702374a979873.zip | |
[DeadArgElim] Remove allocsize attributes on callsites
We're already removing allocsize attributes from Functions that we
remove args from, since removing arguments from a function may make the
allocsize attribute incorrect. It appears we forgot to also remove them
from callsites.
Without this, I get verifier errors on `@Test2`.
It probably wouldn't be too hard to make DAE properly update allocsize
attributes instead of dropping them, but I can't think of a scenario
where that'd be useful in practice.
llvm-svn: 329868
Diffstat (limited to 'llvm/test/Transforms/DeadArgElim/allocsize.ll')
| -rw-r--r-- | llvm/test/Transforms/DeadArgElim/allocsize.ll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Transforms/DeadArgElim/allocsize.ll b/llvm/test/Transforms/DeadArgElim/allocsize.ll index eee55f09dc7..04c1f533eaa 100644 --- a/llvm/test/Transforms/DeadArgElim/allocsize.ll +++ b/llvm/test/Transforms/DeadArgElim/allocsize.ll @@ -11,3 +11,8 @@ define i64 @NeedsArg(i64 %s) { %c = call i64 @MagickMallocAligned(i64 0, i64 %s) ret i64 %c } + +define i64 @Test2(i64 %s) { + %c = call i64 @MagickMallocAligned(i64 0, i64 %s) allocsize(1) + ret i64 %c +} |

