source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/minsize-litpools.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 721 bytes
Line 
1; RUN: llc -mtriple=thumbv7s %s -o -  | FileCheck %s
2; RUN: llc -mtriple=armv7s %s -o -  | FileCheck %s
3
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).
7
8@var = global i32 0
9
10define i32 @small_global() minsize {
11; CHECK-LABEL: small_global:
12; CHECK: ldr r[[GLOBDEST:[0-9]+]], {{.?LCPI0_0}}
13; CHECK: ldr r0, [r[[GLOBDEST]]]
14
15  %val = load i32, i32* @var
16  ret i32 %val
17}
18
19define i32 @big_global() {
20; CHECK-LABEL: big_global:
21; CHECK: movw [[GLOBDEST:r[0-9]+]], :lower16:var
22; CHECK: movt [[GLOBDEST]], :upper16:var
23
24  %val = load i32, i32* @var
25  ret i32 %val
26}
Note: See TracBrowser for help on using the repository browser.