[llvm] [LoopVectorize] Check for vector-to-scalar casts in legalizer (PR #106244)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 11:25:09 PDT 2024
================
@@ -0,0 +1,32 @@
+; RUN: opt --force-widen-divrem-via-safe-divisor=false -passes=loop-vectorize -S --debug-only=loop-vectorize < %s 2>&1 | FileCheck %s
+
+; CHECK: LV: Not vectorizing: Found unvectorizable type %s2 = bitcast <2 x i16> %vec1 to i32
+; CHECK-NOT: Assertion
+
+; Function Attrs: willreturn
+define void @__start() #0 {
+entry:
+ %vec0 = insertelement <2 x i16> undef, i16 0, i64 0
+ %vec1 = insertelement <2 x i16> %vec0, i16 0, i64 1
+ br label %bb0
+
+bb0:
+ %s0 = phi i32 [ %s1, %bb1 ], [ 1, %entry ]
+ br i1 0, label %bb2, label %bb1
+
+bb1:
----------------
artagnon wrote:
Can bb0 and bb1 be merged? Did you run `simplifycfg`?
https://github.com/llvm/llvm-project/pull/106244
More information about the llvm-commits
mailing list