xref: /aosp_15_r20/external/llvm/test/CodeGen/Thumb/constants.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -mcpu=cortex-m0 -verify-machineinstrs | FileCheck --check-prefix CHECK-T1 %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -mcpu=cortex-m3 -verify-machineinstrs | FileCheck --check-prefix CHECK-T2 %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; CHECK-T1-LABEL: @mov_and_add
5*9880d681SAndroid Build Coastguard Worker; CHECK-T2-LABEL: @mov_and_add
6*9880d681SAndroid Build Coastguard Worker; CHECK-T1: movs r0, #255
7*9880d681SAndroid Build Coastguard Worker; CHECK-T1: adds r0, #12
8*9880d681SAndroid Build Coastguard Worker; CHECK-T2: movw r0, #267
9*9880d681SAndroid Build Coastguard Workerdefine i32 @mov_and_add() {
10*9880d681SAndroid Build Coastguard Worker  ret i32 267
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK-T1-LABEL: @mov_and_add2
14*9880d681SAndroid Build Coastguard Worker; CHECK-T2-LABEL: @mov_and_add2
15*9880d681SAndroid Build Coastguard Worker; CHECK-T1: ldr r0,
16*9880d681SAndroid Build Coastguard Worker; CHECK-T2: movw r0, #511
17*9880d681SAndroid Build Coastguard Workerdefine i32 @mov_and_add2() {
18*9880d681SAndroid Build Coastguard Worker  ret i32 511
19*9880d681SAndroid Build Coastguard Worker}
20