From 917c2a6ff2cfcd1263a5dd80c54336754c553ace Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 15 Nov 2007 23:25:33 +0000 Subject: Implement necessary bits for flt_rounds gcc builtin. Codegen bits and llvm-gcc support will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44182 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/IntrinsicLowering.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/IntrinsicLowering.cpp') diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index bd3d74d..0d1da86 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -856,6 +856,11 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { } break; } + case Intrinsic::flt_rounds: + // Lower to "round to the nearest" + if (CI->getType() != Type::VoidTy) + CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1)); + break; } assert(CI->use_empty() && -- cgit v1.1