1 ; RUN: llc -mtriple=arm-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
4 ; RUN: llc -mtriple=thumbv8m.base %s -o - | FileCheck %s
5 ; RUN: llc -mtriple=thumbv8m.base -mcpu=cortex-m23 %s -o - | FileCheck %s --check-prefix=NOMOVT
6 ; RUN: llc -mtriple=thumbv8m.base -mcpu=cortex-m33 %s -o - | FileCheck %s
8 define i32 @t(i32 %X) nounwind {
10 ; CHECK: movt r{{[0-9]}}, #65535
12 ; NOMOVT-NOT: movt r{{[0-9]}}, #65535
13 ; NOMOVT: ldr r{{[0-9]}}, .LCP
15 %0 = or i32 %X, -65536
19 define i32 @t2(i32 %X) nounwind {
21 ; CHECK: movt r{{[0-9]}}, #65534
23 ; NOMOVT-NOT: movt r{{[0-9]}}, #65534
24 ; NOMOVT: ldr r{{[0-9]}}, .LCP
26 %0 = or i32 %X, -131072
27 %1 = and i32 %0, -65537