summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Hexagon/HexagonISelLowering.cpp1
-rw-r--r--llvm/test/CodeGen/Hexagon/isel-vacopy.ll18
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
index 034034d82d5..b7bc2627596 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
@@ -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/llvm/test/CodeGen/Hexagon/isel-vacopy.ll b/llvm/test/CodeGen/Hexagon/isel-vacopy.ll
new file mode 100644
index 00000000000..0138e424696
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/isel-vacopy.ll
@@ -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 }
OpenPOWER on IntegriCloud