1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

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.

llvm-svn: 294345
This commit is contained in:
Tim Northover 2017-02-07 20:08:59 +00:00
parent 704fe71950
commit f2b2f0a4d5
2 changed files with 14 additions and 0 deletions

View 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);

View 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
}