diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2007-11-15 23:25:33 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2007-11-15 23:25:33 +0000 |
commit | c915e271dabb580bad526655306e39bb097f5980 (patch) | |
tree | 0bdf888ec6dc60c6593bcce3ba60a8d446bcc9ed /lib/CodeGen/IntrinsicLowering.cpp | |
parent | 4a365ad43016e3bf8ce4d0383706a57f5d59976d (diff) | |
download | external_llvm-c915e271dabb580bad526655306e39bb097f5980.zip external_llvm-c915e271dabb580bad526655306e39bb097f5980.tar.gz external_llvm-c915e271dabb580bad526655306e39bb097f5980.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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() && |