[PATCH] D29996: [DeadStoreElimination] Check function modref behavior before considering memory clobbered
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 11:47:42 PST 2017
sanjoy added inline comments.
================
Comment at: test/Transforms/DeadStoreElimination/operand-bundles.ll:48
+define void @test4() {
+; CHECK-LABEL: @test4
+ %local_obj = call i8* @calloc(i64 1, i64 4)
----------------
Looks like today `-basicaa -dse` does not elide the second store in
```
declare void @foo()
declare void @bar(i8*)
define void @test4(i8* %ptr) {
store i8 0, i8* %ptr, align 4
call void @foo() readonly
store i8 0, i8* %ptr, align 4
call void @bar(i8* nocapture %ptr)
ret void
}
```
Will it be able to do that with your changes? If so, adding that as a test case will be nice.
https://reviews.llvm.org/D29996
More information about the llvm-commits
mailing list