1 ; RUN: llc -mtriple=thumbv7s %s -o - | FileCheck %s
2 ; RUN: llc -mtriple=armv7s %s -o - | FileCheck %s
4 ; CodeGen should be able to set and reset the MinSize subtarget-feature, and
5 ; make use of it in deciding whether to use MOVW/MOVT for global variables or a
6 ; lit-pool load (saving roughly 2 bytes of code).
10 define i32 @small_global() minsize {
11 ; CHECK-LABEL: small_global:
12 ; CHECK: ldr r[[GLOBDEST:[0-9]+]], {{.?LCPI0_0}}
13 ; CHECK: ldr r0, [r[[GLOBDEST]]]
15 %val = load i32, ptr @var
19 define i32 @big_global() {
20 ; CHECK-LABEL: big_global:
21 ; CHECK: movw [[GLOBDEST:r[0-9]+]], :lower16:var
22 ; CHECK: movt [[GLOBDEST]], :upper16:var
24 %val = load i32, ptr @var