[llvm] r301533 - [SystemZ] Remove incorrect assert in SystemZTTIImpl

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 04:01:18 PDT 2017


Author: jonpa
Date: Thu Apr 27 06:01:18 2017
New Revision: 301533

URL: http://llvm.org/viewvc/llvm-project?rev=301533&view=rev
Log:
[SystemZ]  Remove incorrect assert in SystemZTTIImpl

In getCmpSelInstrCost(), CondTy may actually be scalar while ValTy is a
vector when LoopVectorizer is the caller. Therefore the assert that CondTy
must be a vector type if ValTy is was wrong and is now removed.

Review: Ulrich Weigand

Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp

Modified: llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp?rev=301533&r1=301532&r2=301533&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp Thu Apr 27 06:01:18 2017
@@ -676,7 +676,6 @@ int SystemZTTIImpl::getCmpSelInstrCost(u
                                        const Instruction *I) {
   if (ValTy->isVectorTy()) {
     assert (ST->hasVector() && "getCmpSelInstrCost() called with vector type.");
-    assert (CondTy == nullptr || CondTy->isVectorTy());
     unsigned VF = ValTy->getVectorNumElements();
 
     // Called with a compare instruction.




More information about the llvm-commits mailing list