Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
GlobalISel: translate @llvm.va_end intrinsic.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TNorthover committed Feb 7, 2017
1 parent 04827a7 commit dabb7fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/CodeGen/GlobalISel/IRTranslator.cpp
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Expand Up @@ -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
}

0 comments on commit dabb7fc

Please sign in to comment.