[PATCH] D81617: [SVE] Bail from cstfp_pred_ty before walking scalable vector

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 14:22:04 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3a726bc9935b: [SVE] Bail from cstfp_pred_ty before walking scalable vector (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81617/new/

https://reviews.llvm.org/D81617

Files:
  llvm/include/llvm/IR/PatternMatch.h


Index: llvm/include/llvm/IR/PatternMatch.h
===================================================================
--- llvm/include/llvm/IR/PatternMatch.h
+++ llvm/include/llvm/IR/PatternMatch.h
@@ -333,6 +333,10 @@
         if (const auto *CF = dyn_cast_or_null<ConstantFP>(C->getSplatValue()))
           return this->isValue(CF->getValueAPF());
 
+        // Number of elements of a scalable vector unknown at compile time
+        if (isa<ScalableVectorType>(V->getType()))
+          return false;
+
         // Non-splat vector constant: check each element for a match.
         unsigned NumElts = cast<VectorType>(V->getType())->getNumElements();
         assert(NumElts != 0 && "Constant vector with no elements?");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81617.270867.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200615/1efb94d1/attachment.bin>


More information about the llvm-commits mailing list