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
7 ; RUN: llc -mtriple=thumbv8m.base -mcpu=cortex-m35p %s -o - | FileCheck %s
9 define i32 @t(i32 %X) nounwind {
11 ; CHECK: movt r{{[0-9]}}, #65535
13 ; NOMOVT-NOT: movt r{{[0-9]}}, #65535
14 ; NOMOVT: ldr r{{[0-9]}}, .LCP
16 %0 = or i32 %X, -65536
20 define i32 @t2(i32 %X) nounwind {
22 ; CHECK: movt r{{[0-9]}}, #65534
24 ; NOMOVT-NOT: movt r{{[0-9]}}, #65534
25 ; NOMOVT: ldr r{{[0-9]}}, .LCP
27 %0 = or i32 %X, -131072
28 %1 = and i32 %0, -65537