diff options
| author | Alina Sbirlea <asbirlea@google.com> | 2019-06-17 18:58:40 +0000 |
|---|---|---|
| committer | Alina Sbirlea <asbirlea@google.com> | 2019-06-17 18:58:40 +0000 |
| commit | 7a0098aa6e36a60fd4a825c3a1ea1bddad141501 (patch) | |
| tree | 752979a6bd916c8145ed0aa1585ad0c187559088 /llvm/test/Analysis | |
| parent | 49537bbf74a68c44d32e51f15080500ce994f1fc (diff) | |
| download | bcm5719-llvm-7a0098aa6e36a60fd4a825c3a1ea1bddad141501.tar.gz bcm5719-llvm-7a0098aa6e36a60fd4a825c3a1ea1bddad141501.zip | |
[MemorySSA] Don't use template when the clone is a simplified instruction.
Summary:
LoopRotate doesn't create a faithful clone of an instruction, it may
simplify it beforehand. Hence the clone of an instruction that has a
MemoryDef associated may not be a definition, but a use or not a memory
alternig instruction.
Don't rely on the template when the clone may be simplified.
Reviewers: george.burgess.iv
Subscribers: jlebar, Prazek, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63355
llvm-svn: 363597
Diffstat (limited to 'llvm/test/Analysis')
| -rw-r--r-- | llvm/test/Analysis/MemorySSA/loop-rotate-inv-template.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/Analysis/MemorySSA/loop-rotate-inv-template.ll b/llvm/test/Analysis/MemorySSA/loop-rotate-inv-template.ll new file mode 100644 index 00000000000..ec2e8e6e841 --- /dev/null +++ b/llvm/test/Analysis/MemorySSA/loop-rotate-inv-template.ll @@ -0,0 +1,27 @@ +; RUN: opt -disable-output -loop-rotate -enable-mssa-loop-dependency -verify-memoryssa %s +; REQUIRES: asserts + +; Function Attrs: nounwind +define dso_local void @bar() local_unnamed_addr #0 align 32 { +entry: + br label %looplabel.exit.i + +looplabel.exit.i: ; preds = %if.end.i, %entry + %0 = phi i1 (i32*, i32*)* [ @foo, %entry ], [ undef, %if.end.i ] + %call3.i.i = call zeroext i1 %0(i32* nonnull dereferenceable(16) undef, i32* nonnull undef) + br i1 %call3.i.i, label %if.end.i, label %label.exit + +if.end.i: ; preds = %looplabel.exit.i + %tobool.i = icmp eq i32* undef, null + br label %looplabel.exit.i + +label.exit: ; preds = %looplabel.exit.i + ret void +} + +; Function Attrs: readonly +declare dso_local i1 @foo(i32*, i32*) #1 align 32 + +attributes #0 = { nounwind } +attributes #1 = { readonly } + |

