[polly] r271535 - [NFC] Avoid unnecessary comparison for min/max expressions
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 09:58:12 PDT 2016
Author: jdoerfert
Date: Thu Jun 2 11:58:12 2016
New Revision: 271535
URL: http://llvm.org/viewvc/llvm-project?rev=271535&view=rev
Log:
[NFC] Avoid unnecessary comparison for min/max expressions
Modified:
polly/trunk/lib/CodeGen/IslExprBuilder.cpp
Modified: polly/trunk/lib/CodeGen/IslExprBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslExprBuilder.cpp?rev=271535&r1=271534&r2=271535&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslExprBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslExprBuilder.cpp Thu Jun 2 11:58:12 2016
@@ -186,7 +186,7 @@ Value *IslExprBuilder::createOpNAry(__is
auto Pred = IsMax ? CmpInst::ICMP_SGT : CmpInst::ICMP_SLT;
auto *V = create(isl_ast_expr_get_op_arg(Expr, 0));
- for (int i = 0; i < isl_ast_expr_get_op_n_arg(Expr); ++i) {
+ for (int i = 1; i < isl_ast_expr_get_op_n_arg(Expr); ++i) {
auto *OpV = create(isl_ast_expr_get_op_arg(Expr, i));
unifyTypes(V, OpV);
V = Builder.CreateSelect(Builder.CreateICmp(Pred, V, OpV), V, OpV);
More information about the llvm-commits
mailing list