[llvm] [VPlan] Handle VPWidenCastRecipe without underlying value in EVL transform (PR #120194)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 01:46:51 PST 2024
================
@@ -0,0 +1,31 @@
+; RUN: opt -passes=loop-vectorize -force-tail-folding-style=data-with-evl -prefer-predicate-over-epilogue=predicate-dont-vectorize -mtriple=riscv64 -mattr=+v -S %s
+
+; Make sure we don't crash when transforming a VPWidenCastRecipe created without
+; an underlying value to an EVL recipe. This occurs in this test via
+; VPlanTransforms::truncateToMinimalBitwidths
+
+define void @truncate_to_minimal_bitwidths_widen_cast_recipe(ptr %dst, ptr %src, i32 %mvx) {
+entry:
+ %cmp111 = icmp sgt i32 %mvx, 0
+ br i1 %cmp111, label %for.body13.preheader, label %for.cond.cleanup12
+
----------------
lukel97 wrote:
I'd hope not, I'll stick this through another round of llvm-reduce and see if it can simplify any other parts
https://github.com/llvm/llvm-project/pull/120194
More information about the llvm-commits
mailing list