[PATCH] D31601: Make SLPVectorizer pass the right type argument to getCmpSelInstrCost()
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 11:29:32 PDT 2017
mssimpso added a comment.
Hi Jonas,
This makes sense to me - just a couple of minor comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1705
ScalarTy = SI->getValueOperand()->getType();
+ if (CmpInst *CI = dyn_cast<CmpInst>(VL[0]))
+ ScalarTy = CI->getOperand(0)->getType();
----------------
Why not use an "else if" here?
================
Comment at: test/Transforms/SLPVectorizer/SystemZ/SLP-cmp-cost-query.ll:1
+; RUN: opt -mtriple=systemz-unknown -mcpu=z13 -slp-vectorizer -debug-only=SLP \
+; RUN: -S -disable-output < %s |& FileCheck %s
----------------
You'll need a "REQUIRES: asserts" line to check debug output.
https://reviews.llvm.org/D31601
More information about the llvm-commits
mailing list