]> granicus.if.org Git - llvm/commitdiff
GlobalISel: translate @llvm.va_end intrinsic.
authorTim Northover <tnorthover@apple.com>
Tue, 7 Feb 2017 20:08:59 +0000 (20:08 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 7 Feb 2017 20:08:59 +0000 (20:08 +0000)
Turns out no-one actually cares about this one (at least) in tree so we can
just drop it entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294345 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/GlobalISel/IRTranslator.cpp
test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll

index a1a1d7b9fb5bce7e4803b82982114402bf3dfff4..eee78ea8cbc3cac8fa2e3370fb8452a1ddcf7937 100644 (file)
@@ -579,6 +579,10 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
       MIRBuilder.buildDirectDbgValue(Reg, DI.getVariable(), DI.getExpression());
     return true;
   }
+  case Intrinsic::vaend:
+    // No target I know of cares about va_end. Certainly no in-tree target
+    // does. Simplest intrinsic ever!
+    return true;
   case Intrinsic::dbg_value: {
     // This form of DBG_VALUE is target-independent.
     const DbgValueInst &DI = cast<DbgValueInst>(CI);
index bac3017a925b53a90efadcf6eaafdb3686f20b4d..943a57f55cbca96aec5b735436e99e2bbdfbcca5 100644 (file)
@@ -1123,3 +1123,13 @@ define i8* @test_const_placement() {
 next:
   ret i8* inttoptr(i32 42 to i8*)
 }
+
+declare void @llvm.va_end(i8*)
+define void @test_va_end(i8* %list) {
+; CHECK-LABEL: name: test_va_end
+; CHECK-NOT: va_end
+; CHECK-NOT: INTRINSIC
+; CHECK: RET_ReallyLR
+  call void @llvm.va_end(i8* %list)
+  ret void
+}