[llvm] r294345 - GlobalISel: translate @llvm.va_end intrinsic.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 12:08:59 PST 2017


Author: tnorthover
Date: Tue Feb  7 14:08:59 2017
New Revision: 294345

URL: http://llvm.org/viewvc/llvm-project?rev=294345&view=rev
Log:
GlobalISel: translate @llvm.va_end intrinsic.

Turns out no-one actually cares about this one (at least) in tree so we can
just drop it entirely.

Modified:
    llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
    llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll

Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=294345&r1=294344&r2=294345&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Tue Feb  7 14:08:59 2017
@@ -579,6 +579,10 @@ bool IRTranslator::translateKnownIntrins
       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);

Modified: llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll?rev=294345&r1=294344&r2=294345&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll Tue Feb  7 14:08:59 2017
@@ -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
+}




More information about the llvm-commits mailing list