• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3--- |
4  define void @test_constants() { ret void }
5...
6---
7name:            test_constants
8# CHECK-LABEL: name: test_constants
9legalized:       false
10# CHECK: legalized: true
11regBankSelected: false
12selected:        false
13tracksRegLiveness: true
14registers:
15  - { id: 0, class: _ }
16  - { id: 1, class: _ }
17  - { id: 2, class: _ }
18  - { id: 3, class: _ }
19  - { id: 4, class: _ }
20  - { id: 5, class: _ }
21body:             |
22  bb.0:
23    liveins: $r0
24
25    %4(p0) = COPY $r0
26
27    %0(s32) = G_CONSTANT i32 42
28    ; CHECK: {{%[0-9]+}}:_(s32) = G_CONSTANT i32 42
29
30    %1(s16) = G_CONSTANT i16 21
31    G_STORE %1(s16), %4(p0) :: (store 2)
32    ; CHECK-NOT: G_CONSTANT i16
33    ; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 21
34    ; CHECK: {{%[0-9]+}}:_(s16) = G_TRUNC [[EXT]](s32)
35    ; CHECK-NOT: G_CONSTANT i16
36
37    %2(s8) = G_CONSTANT i8 10
38    G_STORE %2(s8), %4(p0) :: (store 1)
39    ; CHECK-NOT: G_CONSTANT i8
40    ; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
41    ; CHECK: {{%[0-9]+}}:_(s8) = G_TRUNC [[EXT]](s32)
42    ; CHECK-NOT: G_CONSTANT i8
43
44    %3(s1) = G_CONSTANT i1 1
45    G_STORE %3(s1), %4(p0) :: (store 1)
46    ; CHECK-NOT: G_CONSTANT i1
47    ; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
48    ; CHECK: {{%[0-9]+}}:_(s1) = G_TRUNC [[EXT]](s32)
49    ; CHECK-NOT: G_CONSTANT i1
50
51    %5(p0) = G_CONSTANT i32 0
52    G_STORE %5(p0), %4(p0) :: (store 4)
53    ; CHECK: {{%[0-9]+}}:_(p0) = G_CONSTANT i32 0
54
55    $r0 = COPY %0(s32)
56    BX_RET 14, $noreg, implicit $r0
57...
58