1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/ARM/constant-island-SOImm-limit16.mir
Matt Arsenault cc12b285b6 CodeGen: Print/parse LLTs in MachineMemOperands
This will currently accept the old number of bytes syntax, and convert
it to a scalar. This should be removed in the near future (I think I
converted all of the tests already, but likely missed a few).

Not sure what the exact syntax and policy should be. We can continue
printing the number of bytes for non-generic instructions to avoid
test churn and only allow non-scalar types for generic instructions.

This will currently print the LLT in parentheses, but accept parsing
the existing integers and implicitly converting to scalar. The
parentheses are a bit ugly, but the parser logic seems unable to deal
without either parentheses or some keyword to indicate the start of a
type.
2021-06-30 16:54:13 -04:00

63 lines
1.9 KiB
YAML

# RUN: sed -e "s/SPACEBYTES/100/g" %s | sed -e "s/OFFSET/116/g" > %t.mir
# RUN: llc %t.mir --filetype=obj -start-before=arm-cp-islands -o - | \
# RUN: llvm-objdump --arch=armv8a --disassemble - | FileCheck %t.mir
# RUN: sed -e "s/SPACEBYTES/400/g" %s | sed -e "s/OFFSET/12/g" > %t.mir
# RUN: llc %t.mir --filetype=obj -start-before=arm-cp-islands -o - | \
# RUN: llvm-objdump --arch=armv8a --disassemble - | FileCheck %t.mir
# RUN: sed -e "s/SPACEBYTES/800/g" %s | sed -e "s/OFFSET/12/g" > %t.mir
# RUN: llc %t.mir --filetype=obj -start-before=arm-cp-islands -o - | \
# RUN: llvm-objdump --arch=armv8a --disassemble - | FileCheck %t.mir
--- |
target triple = "armv8.2a-arm-none-eabi"
define dso_local i32 @main() #0 { ret i32 0 }
attributes #0 = { "frame-pointer"="all" } !4 = !{i32 210}
...
---
name: main
alignment: 4
tracksRegLiveness: true
constants:
-
id: 0
value: half 0xH5440
alignment: 2
-
id: 1
value: half 0xH5441
alignment: 2
machineFunctionInfo: {}
body: |
bb.0 (%ir-block.0):
liveins: $lr
$sp = frame-setup STMDB_UPD $sp, 14, $noreg, killed $r11, killed $lr
$r11 = frame-setup MOVr killed $sp, 14, $noreg, $noreg
$sp = frame-setup SUBri killed $sp, 80, 14, $noreg, $noreg
; Test handling of 16-bit constant pool entries.
; 2 consecutive entries: 1 is 4-byte aligned, 1 is not 4-byte aligned.
renamable $r1 = LEApcrel %const.0, 14, $noreg
renamable $r1 = LDRH killed renamable $r1, $noreg, 0, 14, $noreg :: (load (s16) from constant-pool)
renamable $r1 = LEApcrel %const.1, 14, $noreg
renamable $r1 = LDRH killed renamable $r1, $noreg, 0, 14, $noreg :: (load (s16) from constant-pool)
renamable $r0 = SPACE SPACEBYTES, undef renamable $r0
$sp = frame-destroy MOVr $r11, 14, $noreg, $noreg
$sp = frame-destroy LDMIA_RET $sp, 14, $noreg, def $r11, def $pc, implicit killed $r0
# CHECK: add r1, pc, #OFFSET
---
...