[fast-isel] Add support for the expect intrinsic.

rdar://13370942

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier 2013-03-07 20:42:17 +00:00
parent 3853f74aba
commit 33947b4391
2 changed files with 17 additions and 0 deletions

View File

@ -698,6 +698,11 @@ bool FastISel::SelectCall(const User *I) {
UpdateValueMap(Call, ResultReg);
return true;
}
case Intrinsic::expect: {
// unsigned ResultReg = getRegForValue(Call->getArgOperand(0));
// UpdateValueMap(Call, ResultReg);
// return true;
}
}
// Usually, it does not make sense to initialize a value,

View File

@ -238,3 +238,15 @@ define void @t7() nounwind ssp {
call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 3, i32 2, i1 false)
ret void
}
define i32 @t8(i32 %x) nounwind {
entry:
; ARM: t8
; ARM-NOT: FastISel missed call: %expval = call i32 @llvm.expect.i32(i32 %x, i32 1)
; THUMB: t8
; THUMB-NOT: FastISel missed call: %expval = call i32 @llvm.expect.i32(i32 %x, i32 1)
%expval = call i32 @llvm.expect.i32(i32 %x, i32 1)
ret i32 %expval
}
declare i32 @llvm.expect.i32(i32, i32) nounwind readnone