summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-03-01 00:16:31 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-03-01 00:16:31 +0000
commita56f411961c41d8b4f6ffc62c95c5fc95fbac8c8 (patch)
tree2348b19d2c3724d3a4ee73d642f34430ef2ab6b4 /test/CodeGen/Mips
parent39d994c78bf3d9844dcbf2a236d4178155168ebf (diff)
downloadllvm-a56f411961c41d8b4f6ffc62c95c5fc95fbac8c8.tar.gz
llvm-a56f411961c41d8b4f6ffc62c95c5fc95fbac8c8.tar.bz2
llvm-a56f411961c41d8b4f6ffc62c95c5fc95fbac8c8.tar.xz
[mips] Define class MemDefsUses.
This class tracks dependence between memory instructions using underlying objects of memory operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/brdelayslot.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/brdelayslot.ll b/test/CodeGen/Mips/brdelayslot.ll
index c3f483ae8e..1e66ecf14d 100644
--- a/test/CodeGen/Mips/brdelayslot.ll
+++ b/test/CodeGen/Mips/brdelayslot.ll
@@ -1,5 +1,7 @@
; RUN: llc -march=mipsel -O0 < %s | FileCheck %s -check-prefix=None
; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=Default
+; RUN: llc -march=mipsel -O1 -relocation-model=static < %s | \
+; RUN: FileCheck %s -check-prefix=STATICO1
define void @foo1() nounwind {
entry:
@@ -80,3 +82,20 @@ entry:
declare void @foo7(double, float)
+; Check that a store can move past other memory instructions.
+;
+; STATICO1: foo8:
+; STATICO1: jalr ${{[0-9]+}}
+; STATICO1-NEXT: sw ${{[0-9]+}}, %lo(g1)
+
+@foo9 = common global void ()* null, align 4
+
+define i32 @foo8(i32 %a) nounwind {
+entry:
+ store i32 %a, i32* @g1, align 4
+ %0 = load void ()** @foo9, align 4
+ tail call void %0() nounwind
+ %1 = load i32* @g1, align 4
+ %add = add nsw i32 %1, %a
+ ret i32 %add
+}