]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/ARM/Windows/movw-movt-relocations.ll
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
[FreeBSD/FreeBSD.git] / test / CodeGen / ARM / Windows / movw-movt-relocations.ll
1 ; RUN: llc -mtriple=thumbv7-windows -o - %s \
2 ; RUN:   | FileCheck %s -check-prefix CHECK-WINDOWS
3
4 ; RUN: llc -mtriple=thumbv7-eabi -o - %s \
5 ; RUN:   | FileCheck %s -check-prefix CHECK-EABI
6
7 @i = common global i32 0, align 4
8 @j = common global i32 0, align 4
9
10 ; Function Attrs: nounwind optsize readonly
11 define i32 @relocation(i32 %j, i32 %k) {
12 entry:
13   %0 = load i32* @i, align 4
14   %1 = load i32* @j, align 4
15   %add = add nsw i32 %1, %0
16   ret i32 %add
17 }
18
19 ; CHECK-WINDOWS: movw r[[i:[0-4]]], :lower16:i
20 ; CHECK-WINDOWS-NEXT: movt r[[i]], :upper16:i
21 ; CHECK-WINDOWS: movw r[[j:[0-4]]], :lower16:j
22 ; CHECK-WINDOWS-NEXT: movt r[[j]], :upper16:j
23
24 ; CHECK-EABI: movw r[[i:[0-4]]], :lower16:i
25 ; CHECK-EABI: movw r[[j:[0-4]]], :lower16:j
26 ; CHECK-EABI-NEXT: movt r[[i]], :upper16:i
27 ; CHECK-EABI-NEXT: movt r[[j]], :upper16:j