~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/CodeGen/Mips/inlineasmmemop.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -march=mipsel < %s | FileCheck %s
 
2
 
 
3
@g1 = external global i32
 
4
 
 
5
define i32 @f1(i32 %x) nounwind {
 
6
entry:
 
7
; CHECK: addiu $[[T0:[0-9]+]], $sp
 
8
; CHECK: #APP
 
9
; CHECK: sw $4, 0($[[T0]])
 
10
; CHECK: #NO_APP
 
11
; CHECK: #APP
 
12
; CHECK: lw $[[T3:[0-9]+]], 0($[[T0]])
 
13
; CHECK: #NO_APP
 
14
; CHECK: lw  $[[T1:[0-9]+]], %got(g1)($gp)
 
15
; CHECK: sw  $[[T3]], 0($[[T1]])
 
16
 
 
17
  %l1 = alloca i32, align 4
 
18
  call void asm "sw $1, $0", "=*m,r"(i32* %l1, i32 %x) nounwind
 
19
  %0 = call i32 asm "lw $0, $1", "=r,*m"(i32* %l1) nounwind
 
20
  store i32 %0, i32* @g1, align 4
 
21
  ret i32 %0
 
22
}
 
23