Implement necessary bits for flt_rounds gcc builtin.
Codegen bits and llvm-gcc support will follow.
llvm-svn: 44182
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index bd3d74d..0d1da86 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp
@@ -856,6 +856,11 @@
}
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() &&