gandhi21299 updated this revision to Diff 336249.
gandhi21299 added a comment.
- enclosing classes in PPCCallLowering,h within the llvm namespace
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99812/new/
https://reviews.llvm.org/D99812
Files:
llvm/lib/Target/PowerPC/GISel/PPCCallLowering.cpp
llvm/lib/Target/PowerPC/GISel/PPCCallLowering.h
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-args-lowering.ll
llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-ret.ll
Index: llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-ret.ll
===
--- llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-ret.ll
+++ /dev/null
@@ -1,7 +0,0 @@
-; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -global-isel -verify-machineinstrs -stop-after=irtranslator < %s | FileCheck %s
-
-; CHECK: name: f
-; CHECK: BLR8
-define void @f() {
- ret void
-}
Index: llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-args-lowering.ll
===
--- /dev/null
+++ llvm/test/CodeGen/PowerPC/GlobalISel/irtranslator-args-lowering.ll
@@ -0,0 +1,188 @@
+; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -global-isel -verify-machineinstrs -stop-after=irtranslator < %s | FileCheck %s
+
+%struct.A = type { i8, float, i32, i32, i32 }
+
+define void @f() {
+ ; CHECK-LABEL: name: f
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ ret void
+}
+
+define void @foo1(i32 %x){
+ ; CHECK-LABEL: name: foo1
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: liveins: $x3
+ ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x3
+ ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ret void
+}
+
+define void @foo2(i64 %x){
+ ; CHECK-LABEL: name: foo2
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: liveins: $x3
+ ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x3
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ret void
+}
+
+define void @foo3(<7 x i8> %x) {
+ ; CHECK-LABEL: name: foo3
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: liveins: $x3, $x4, $x5, $x6, $x7, $x8, $x9
+ ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x3
+ ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
+ ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x4
+ ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
+ ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x5
+ ; CHECK: [[TRUNC2:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s64)
+ ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x6
+ ; CHECK: [[TRUNC3:%[0-9]+]]:_(s32) = G_TRUNC [[COPY3]](s64)
+ ; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY $x7
+ ; CHECK: [[TRUNC4:%[0-9]+]]:_(s32) = G_TRUNC [[COPY4]](s64)
+ ; CHECK: [[COPY5:%[0-9]+]]:_(s64) = COPY $x8
+ ; CHECK: [[TRUNC5:%[0-9]+]]:_(s32) = G_TRUNC [[COPY5]](s64)
+ ; CHECK: [[COPY6:%[0-9]+]]:_(s64) = COPY $x9
+ ; CHECK: [[TRUNC6:%[0-9]+]]:_(s32) = G_TRUNC [[COPY6]](s64)
+ ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<7 x s32>) = G_BUILD_VECTOR [[TRUNC]](s32), [[TRUNC1]](s32), [[TRUNC2]](s32), [[TRUNC3]](s32), [[TRUNC4]](s32), [[TRUNC5]](s32), [[TRUNC6]](s32)
+ ; CHECK: [[TRUNC7:%[0-9]+]]:_(<7 x s8>) = G_TRUNC [[BUILD_VECTOR]](<7 x s32>)
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ ret void
+}
+
+define void @foo_notrunc(<7 x i64> %x) {
+ ; CHECK-LABEL: name: foo_notrunc
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: liveins: $x3, $x4, $x5, $x6, $x7, $x8, $x9
+ ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x3
+ ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x4
+ ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x5
+ ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x6
+ ; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY $x7
+ ; CHECK: [[COPY5:%[0-9]+]]:_(s64) = COPY $x8
+ ; CHECK: [[COPY6:%[0-9]+]]:_(s64) = COPY $x9
+ ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<7 x s64>) = G_BUILD_VECTOR [[COPY]](s64), [[COPY1]](s64), [[COPY2]](s64), [[COPY3]](s64), [[COPY4]](s64), [[COPY5]](s64), [[COPY6]](s64)
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ ret void
+}
+
+define void @foo_pt(<7 x i8>* %x) {
+ ; CHECK-LABEL: name: foo_pt
+ ; CHECK: bb.1 (%ir-block.0):
+ ; CHECK: liveins: $x3
+ ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x3
+ ; CHECK: BLR8 implicit $lr8, implicit $rm
+ ret void
+}
+
+define dso_local void @foo_struct(%struct.A %a) #0 {
+ ; CHECK-LABEL: name: foo_struct
+ ; CHECK: bb.1.entry:
+ ; CHECK: liveins: $f1, $x3, $x4, $x5, $x6
+ ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x3
+ ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY]](s64)
+ ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $f1
+ ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
+ ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x4
+ ; CHECK: [[TRUNC2:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s64)
+