[llvm] [LV] Avoid crashing for vector calls with scalar byte types (PR #197417)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 05:08:20 PDT 2026


================
@@ -5026,7 +5027,8 @@ void LoopVectorizationCostModel::setVectorizedCallDecision(ElementCount VF) {
             // TODO: do we need to figure out the cost of an extract to get the
             // first lane? Or do we hope that it will be folded away?
             ScalarEvolution *SE = PSE.getSE();
-            if (!match(SE->getSCEV(ScalarParam),
+            if (!SE->isSCEVable(ScalarParam->getType()) ||
----------------
david-arm wrote:

Is this change actually needed? I would expect getSCEV to return SCEVUnknown or something like that so it won't match anyway.

https://github.com/llvm/llvm-project/pull/197417


More information about the llvm-commits mailing list