OSDN Git Service

[Hexagon] Handle VACOPY in isel lowering
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 2 Mar 2018 18:35:57 +0000 (18:35 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 2 Mar 2018 18:35:57 +0000 (18:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326599 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonISelLowering.cpp
test/CodeGen/Hexagon/isel-vacopy.ll [new file with mode: 0644]

index 034034d..b7bc262 100644 (file)
@@ -1307,6 +1307,7 @@ HexagonTargetLowering::HexagonTargetLowering(const TargetMachine &TM,
   setOperationAction(ISD::VASTART, MVT::Other, Custom);
   setOperationAction(ISD::VAEND,   MVT::Other, Expand);
   setOperationAction(ISD::VAARG,   MVT::Other, Expand);
+  setOperationAction(ISD::VACOPY,  MVT::Other, Expand);
 
   setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
   setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
diff --git a/test/CodeGen/Hexagon/isel-vacopy.ll b/test/CodeGen/Hexagon/isel-vacopy.ll
new file mode 100644 (file)
index 0000000..0138e42
--- /dev/null
@@ -0,0 +1,18 @@
+; RUN: llc -march=hexagon < %s | FileCheck %s
+
+; Check for successful compilation
+; CHECK: jumpr r31
+
+target triple = "hexagon"
+
+; Function Attrs: nounwind
+define hidden fastcc void @f0() unnamed_addr #0 {
+b0:
+  call void @llvm.va_copy(i8* nonnull undef, i8* nonnull undef)
+  ret void
+}
+
+; Function Attrs: nounwind
+declare void @llvm.va_copy(i8*, i8*) #0
+
+attributes #0 = { nounwind }