about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2018-03-21 21:49:22 +0100
committergnzlbg <gonzalobg88@gmail.com>2018-03-26 10:20:41 +0200
commit7d5343a6700581e318189dcd74567b348bd7f68d (patch)
tree6a1de1c1a299aad05b03e849b3ce98ab53d3a69e /src/rustllvm/RustWrapper.cpp
parent184156ed97a0a1256e80a17b8673749569407c94 (diff)
downloadrust-7d5343a6700581e318189dcd74567b348bd7f68d.tar.gz
rust-7d5343a6700581e318189dcd74567b348bd7f68d.zip
implement minmax intrinsics
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index e815d151aeb..627827105cb 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -1500,3 +1500,12 @@ LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS,
   return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name));
 }
 #endif
+
+extern "C" LLVMValueRef
+LLVMRustBuildMinNum(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS) {
+    return wrap(unwrap(B)->CreateMinNum(unwrap(LHS),unwrap(RHS)));
+}
+extern "C" LLVMValueRef
+LLVMRustBuildMaxNum(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS) {
+    return wrap(unwrap(B)->CreateMaxNum(unwrap(LHS),unwrap(RHS)));
+}