2018-12-19 17:55:10 +08:00
|
|
|
# RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s
|
|
|
|
# RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s
|
|
|
|
--- |
|
|
|
|
define void @test_constants() { ret void }
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test_constants
|
|
|
|
# CHECK-LABEL: name: test_constants
|
|
|
|
legalized: false
|
|
|
|
# CHECK: legalized: true
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: _ }
|
|
|
|
- { id: 2, class: _ }
|
|
|
|
- { id: 3, class: _ }
|
|
|
|
- { id: 4, class: _ }
|
|
|
|
- { id: 5, class: _ }
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $r0
|
|
|
|
|
|
|
|
%4(p0) = COPY $r0
|
|
|
|
|
2019-02-05 07:29:31 +08:00
|
|
|
%0(s32) = G_CONSTANT i32 42
|
|
|
|
; CHECK: {{%[0-9]+}}:_(s32) = G_CONSTANT i32 42
|
2018-12-19 17:55:10 +08:00
|
|
|
|
|
|
|
%1(s16) = G_CONSTANT i16 21
|
|
|
|
G_STORE %1(s16), %4(p0) :: (store 2)
|
|
|
|
; CHECK-NOT: G_CONSTANT i16
|
|
|
|
; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 21
|
|
|
|
; CHECK: {{%[0-9]+}}:_(s16) = G_TRUNC [[EXT]](s32)
|
|
|
|
; CHECK-NOT: G_CONSTANT i16
|
|
|
|
|
|
|
|
%2(s8) = G_CONSTANT i8 10
|
|
|
|
G_STORE %2(s8), %4(p0) :: (store 1)
|
|
|
|
; CHECK-NOT: G_CONSTANT i8
|
|
|
|
; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
|
|
|
|
; CHECK: {{%[0-9]+}}:_(s8) = G_TRUNC [[EXT]](s32)
|
|
|
|
; CHECK-NOT: G_CONSTANT i8
|
|
|
|
|
|
|
|
%3(s1) = G_CONSTANT i1 1
|
|
|
|
G_STORE %3(s1), %4(p0) :: (store 1)
|
|
|
|
; CHECK-NOT: G_CONSTANT i1
|
2019-12-04 02:40:03 +08:00
|
|
|
; CHECK: [[EXT:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
2018-12-19 17:55:10 +08:00
|
|
|
; CHECK: {{%[0-9]+}}:_(s1) = G_TRUNC [[EXT]](s32)
|
|
|
|
; CHECK-NOT: G_CONSTANT i1
|
|
|
|
|
2019-02-05 07:29:31 +08:00
|
|
|
%5(p0) = G_CONSTANT i32 0
|
2018-12-19 17:55:10 +08:00
|
|
|
G_STORE %5(p0), %4(p0) :: (store 4)
|
2019-02-05 07:29:31 +08:00
|
|
|
; CHECK: {{%[0-9]+}}:_(p0) = G_CONSTANT i32 0
|
2018-12-19 17:55:10 +08:00
|
|
|
|
|
|
|
$r0 = COPY %0(s32)
|
|
|
|
BX_RET 14, $noreg, implicit $r0
|
|
|
|
...
|