1 # RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s
2 # RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s
4 define void @test_legal_loads_stores() { ret void }
6 define void @test_gep() { ret void }
9 name: test_legal_loads_stores
10 # CHECK-LABEL: name: test_legal_loads_stores
12 # CHECK: legalized: true
13 regBankSelected: false
15 tracksRegLiveness: true
28 ; These are all legal, so we should find them unchanged in the output
29 ; CHECK-DAG: G_STORE {{%[0-9]+}}(s32), %0(p0)
30 ; CHECK-DAG: G_STORE {{%[0-9]+}}(s16), %0(p0)
31 ; CHECK-DAG: G_STORE {{%[0-9]+}}(s8), %0(p0)
32 ; CHECK-DAG: G_STORE {{%[0-9]+}}(s1), %0(p0)
33 ; CHECK-DAG: G_STORE {{%[0-9]+}}(p0), %0(p0)
34 ; CHECK-DAG: {{%[0-9]+}}:_(s32) = G_LOAD %0(p0)
35 ; CHECK-DAG: {{%[0-9]+}}:_(s16) = G_LOAD %0(p0)
36 ; CHECK-DAG: {{%[0-9]+}}:_(s8) = G_LOAD %0(p0)
37 ; CHECK-DAG: {{%[0-9]+}}:_(s1) = G_LOAD %0(p0)
38 ; CHECK-DAG: {{%[0-9]+}}:_(p0) = G_LOAD %0(p0)
40 %2(s32) = G_LOAD %0(p0) :: (load 4)
41 G_STORE %2(s32), %0(p0) :: (store 4)
42 %3(s16) = G_LOAD %0(p0) :: (load 2)
43 G_STORE %3(s16), %0(p0) :: (store 2)
44 %4(s8) = G_LOAD %0(p0) :: (load 1)
45 G_STORE %4(s8), %0(p0) :: (store 1)
46 %5(s1) = G_LOAD %0(p0) :: (load 1)
47 G_STORE %5(s1), %0(p0) :: (store 1)
48 %6(p0) = G_LOAD %0(p0) :: (load 4)
49 G_STORE %6(p0), %0(p0) :: (store 4)
54 # CHECK-LABEL: name: test_gep
56 # CHECK: legalized: true
57 regBankSelected: false
59 tracksRegLiveness: true
71 ; CHECK: {{%[0-9]+}}:_(p0) = G_GEP {{%[0-9]+}}, {{%[0-9]+}}(s32)
72 %2(p0) = G_GEP %0, %1(s32)
75 BX_RET 14, $noreg, implicit $r0