summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorKazushi (Jam) Marukawa <marukawa@nec.com>2020-01-14 09:58:39 +0100
committerSimon Moll <simon.moll@emea.nec.com>2020-01-15 09:55:16 +0100
commit064859bde79ccd221fd5196fd2d889014c5435c4 (patch)
tree5a98439120d344e7b1649c0fd2cda0b26fbbaa65 /llvm/test
parentbe8f217b180e134d568ff491b045d05c137b6234 (diff)
downloadbcm5719-llvm-064859bde79ccd221fd5196fd2d889014c5435c4.tar.gz
bcm5719-llvm-064859bde79ccd221fd5196fd2d889014c5435c4.zip
[VE] Minimal codegen for empty functions
Summary: This patch implements minimal VE code generation for empty function bodies (no args, no value return). Contents * empty function code generation test. * Minimal function prologue & epilogue emission * Instruction formats and instruction definitions as far as required for the empty function prologue & epilogue. * I64 register class definitions. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D72598
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/VE/simple_prologue_epilogue.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/VE/simple_prologue_epilogue.ll b/llvm/test/CodeGen/VE/simple_prologue_epilogue.ll
new file mode 100644
index 00000000000..8470e763f3b
--- /dev/null
+++ b/llvm/test/CodeGen/VE/simple_prologue_epilogue.ll
@@ -0,0 +1,32 @@
+; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
+
+define void @func() {
+; CHECK-LABEL: func:
+; CHECK: # %bb.0:
+; CHECK-NEXT: st %s9, (,%s11)
+; CHECK-NEXT: st %s10, 8(,%s11)
+; CHECK-NEXT: st %s15, 24(,%s11)
+; CHECK-NEXT: st %s16, 32(,%s11)
+; CHECK-NEXT: or %s9, 0, %s11
+; CHECK-NEXT: lea %s13, -176
+; CHECK-NEXT: and %s13, %s13, (32)0
+; CHECK-NEXT: lea.sl %s11, -1(%s11, %s13)
+; CHECK-NEXT: brge.l %s11, %s8, .LBB0_2
+; CHECK-NEXT: # %bb.1:
+; CHECK-NEXT: ld %s61, 24(,%s14)
+; CHECK-NEXT: or %s62, 0, %s0
+; CHECK-NEXT: lea %s63, 315
+; CHECK-NEXT: shm.l %s63, (%s61)
+; CHECK-NEXT: shm.l %s8, 8(%s61)
+; CHECK-NEXT: shm.l %s11, 16(%s61)
+; CHECK-NEXT: monc
+; CHECK-NEXT: or %s0, 0, %s62
+; CHECK-NEXT: .LBB0_2:
+; CHECK-NEXT: or %s11, 0, %s9
+; CHECK-NEXT: ld %s16, 32(,%s11)
+; CHECK-NEXT: ld %s15, 24(,%s11)
+; CHECK-NEXT: ld %s10, 8(,%s11)
+; CHECK-NEXT: ld %s9, (,%s11)
+; CHECK-NEXT: b.l (,%lr)
+ ret void
+}
OpenPOWER on IntegriCloud