tqchen commented on code in PR #19589:
URL: https://github.com/apache/tvm/pull/19589#discussion_r3267163141
##########
src/target/llvm/codegen_llvm.cc:
##########
@@ -1598,12 +1598,22 @@ llvm::Value* CodeGenLLVM::VisitExpr_(const ModNode* op)
{
llvm::Value* CodeGenLLVM::VisitExpr_(const MinNode* op) {
llvm::Value* a = MakeValue(op->a);
llvm::Value* b = MakeValue(op->b);
+ if (op->a.dtype().is_float()) {
+#if TVM_LLVM_VERSION >= 120
+ return builder_->CreateMinimum(a, b);
+#endif
+ }
return builder_->CreateSelect(CreateLT(op->a.dtype(), a, b), a, b);
}
llvm::Value* CodeGenLLVM::VisitExpr_(const MaxNode* op) {
llvm::Value* a = MakeValue(op->a);
llvm::Value* b = MakeValue(op->b);
+ if (op->a.dtype().is_float()) {
+#if TVM_LLVM_VERSION >= 120
Review Comment:
we bumped llvm minimum version to 150, so it isnot needed
https://github.com/apache/tvm/pull/18853
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]