aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/Util/MemorySSA/load-invariant.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/Util/MemorySSA/load-invariant.ll')
-rw-r--r--test/Transforms/Util/MemorySSA/load-invariant.ll41
1 files changed, 0 insertions, 41 deletions
diff --git a/test/Transforms/Util/MemorySSA/load-invariant.ll b/test/Transforms/Util/MemorySSA/load-invariant.ll
deleted file mode 100644
index 3c55db11597b..000000000000
--- a/test/Transforms/Util/MemorySSA/load-invariant.ll
+++ /dev/null
@@ -1,41 +0,0 @@
-; RUN: opt -basicaa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1 | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>' -verify-memoryssa -disable-output < %s 2>&1 | FileCheck %s
-;
-; Invariant loads should be considered live on entry, because, once the
-; location is known to be dereferenceable, the value can never change.
-;
-; Currently XFAILed because this optimization was held back from the initial
-; commit.
-
-@g = external global i32
-
-declare void @clobberAllTheThings()
-
-; CHECK-LABEL: define i32 @foo
-define i32 @foo() {
-; CHECK: 1 = MemoryDef(liveOnEntry)
-; CHECK-NEXT: call void @clobberAllTheThings()
- call void @clobberAllTheThings()
-; CHECK: MemoryUse(liveOnEntry)
-; CHECK-NEXT: %1 = load i32
- %1 = load i32, i32* @g, align 4, !invariant.load !0
- ret i32 %1
-}
-
-; CHECK-LABEL: define i32 @bar
-define i32 @bar(i32* %a) {
-; CHECK: 1 = MemoryDef(liveOnEntry)
-; CHECK-NEXT: call void @clobberAllTheThings()
- call void @clobberAllTheThings()
-
-; CHECK: 2 = MemoryDef(1)
-; CHECK-NEXT: %1 = load atomic i32
- %1 = load atomic i32, i32* %a acquire, align 4, !invariant.load !0
-
-; CHECK: MemoryUse(2)
-; CHECK-NEXT: %2 = load i32
- %2 = load i32, i32* %a, align 4
- ret i32 %2
-}
-
-!0 = !{}