• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=armv4-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
2; RUN: llc -mtriple=armv4t-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
3; RUN: llc -mtriple=armv5-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
4; RUN: llc -mtriple=armv6-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
5; RUN: llc -mtriple=armv7-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
6; RUN: llc -mtriple=thumbv6-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
7; RUN: llc -mtriple=thumbv7-none--eabi < %s | FileCheck %s --check-prefix=CHECK-LOLOMOV
8; CHECK-LOLOMOV-LABEL:  foo
9; CHECK-LOLOMOV:        mov [[TMP:r[0-7]]], [[SRC1:r[01]]]
10; CHECK-LOLOMOV-NEXT:   mov [[SRC1]], [[SRC2:r[01]]]
11; CHECK-LOLOMOV-NEXT:   mov [[SRC2]], [[TMP]]
12; CHECK-LOLOMOV-LABEL:  bar
13; CHECK-LOLOMOV-LABEL:  fnend
14;
15; 'MOV lo, lo' in Thumb mode produces undefined results on pre-v6 hardware
16; RUN: llc -mtriple=thumbv4t-none--eabi < %s | FileCheck %s --check-prefix=CHECK-NOLOLOMOV
17; RUN: llc -mtriple=thumbv5-none--eabi < %s | FileCheck %s --check-prefix=CHECK-NOLOLOMOV
18; CHECK-NOLOLOMOV-LABEL: foo
19; CHECK-NOLOLOMOV-NOT:   mov [[TMP:r[0-7]]], [[SRC1:r[01]]]
20; CHECK-NOLOLOMOV:       push  {[[SRC1:r[01]]]}
21; CHECK-NOLOLOMOV-NEXT:  pop {[[TMP:r[0-7]]]}
22; CHECK-NOLOLOMOV-NOT:   mov [[TMP:r[0-7]]], [[SRC1:r[01]]]
23; CHECK-NOLOLOMOV:       push  {[[SRC2:r[01]]]}
24; CHECK-NOLOLOMOV-NEXT:  pop {[[SRC1]]}
25; CHECK-NOLOLOMOV-NOT:   mov [[TMP:r[0-7]]], [[SRC1:r[01]]]
26; CHECK-NOLOLOMOV:       push  {[[TMP]]}
27; CHECK-NOLOLOMOV-NEXT:  pop {[[SRC2]]}
28; CHECK-NOLOLOMOV-LABEL: bar
29; CHECK-NOLOLOMOV-LABEL: fnend
30
31declare void @bar(i32, i32)
32
33define void @foo(i32 %a, i32 %b) {
34entry:
35  call void @bar(i32 %b, i32 %a);
36  ret void
37}
38
39