1 ; RUN: llc -mtriple=arm-eabi %s -o /dev/null
2 ; RUN: llc -mtriple=thumbv6m-eabi -mattr=+execute-only %s -o - -filetype=obj | \
3 ; RUN: llvm-objdump -d --no-leading-addr --no-show-raw-insn - | FileCheck %s
6 ; CHECK-LABEL: <test1>:
7 ;; are we using correct prologue immediate materialization pattern for
9 ; CHECK: sub sp, #0x100
10 %tmp = alloca [ 64 x i32 ] , align 4
14 define void @test2() {
15 ; CHECK-LABEL: <test2>:
16 ;; are we using correct prologue immediate materialization pattern for
18 ; CHECK: movs [[REG:r[0-9]+]], #0xff
19 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
20 ; CHECK-NEXT: adds [[REG]], #0xff
21 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
22 ; CHECK-NEXT: adds [[REG]], #0xef
23 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
24 ; CHECK-NEXT: adds [[REG]], #0xb8
25 %tmp = alloca [ 4168 x i8 ] , align 4
30 ;; are we using correct prologue immediate materialization pattern for
32 ; CHECK-LABEL: <test3>:
33 ; CHECK: movs [[REG:r[0-9]+]], #0xcf
34 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
35 ; CHECK-NEXT: adds [[REG]], #0xff
36 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
37 ; CHECK-NEXT: adds [[REG]], #0xff
38 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x8
39 ; CHECK-NEXT: adds [[REG]], #0xf4
40 %retval = alloca i32, align 4
41 %tmp = alloca i32, align 4
42 %a = alloca [u0x30000001 x i8], align 16
44 ;; are we choosing correct store/tSTRspi pattern for execute-only
45 ; CHECK: movs [[REG:r[0-9]+]], #0x30
46 ; CHECK-NEXT: lsls [[REG]], [[REG]], #0x18
47 ; CHECK-NEXT: add [[REG]], sp
48 ; CHECK-NEXT: str {{r[0-9]+}}, [[[REG]], #0x4]
49 %tmp1 = load i32, ptr %tmp