[llvm] 3818943 - [LV] Add crashing test from #55096.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 14:40:43 PDT 2022
Author: Florian Hahn
Date: 2022-05-12T22:40:28+01:00
New Revision: 38189438b69ca27b4c6ce707c52dbd217583d046
URL: https://github.com/llvm/llvm-project/commit/38189438b69ca27b4c6ce707c52dbd217583d046
DIFF: https://github.com/llvm/llvm-project/commit/38189438b69ca27b4c6ce707c52dbd217583d046.diff
LOG: [LV] Add crashing test from #55096.
Added:
llvm/test/Transforms/LoopVectorize/X86/pr55096-scalarize-add.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopVectorize/X86/pr55096-scalarize-add.ll b/llvm/test/Transforms/LoopVectorize/X86/pr55096-scalarize-add.ll
new file mode 100644
index 0000000000000..d75ab660461ec
--- /dev/null
+++ b/llvm/test/Transforms/LoopVectorize/X86/pr55096-scalarize-add.ll
@@ -0,0 +1,34 @@
+; RUN: opt -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -S %s | FileCheck %s
+
+; REQUIRES: asserts
+; XFAIL: *
+
+target triple = "x86_64-apple-macosx"
+
+; CHECK: vector.body
+
+define void @test_pr55096(i64 %c, ptr %p) {
+entry:
+ br label %loop.header
+
+loop.header:
+ %iv.1 = phi i64 [ 122, %entry ], [ %iv.1.next, %loop.latch ]
+ %iv.2 = phi i16 [ 6229, %entry ], [ %iv.2.next, %loop.latch ]
+ %iv.2.next = add i16 %iv.2, 2008
+ %cmp = icmp ult i64 %iv.1, %c
+ br i1 %cmp, label %loop.latch, label %loop.then
+
+loop.then:
+ %div = udiv i16 4943, %iv.2.next
+ %gep = getelementptr inbounds i16, ptr %p, i16 %div
+ store i16 0, ptr %gep, align 2
+ br label %loop.latch
+
+loop.latch:
+ %iv.1.next = add nuw nsw i64 %iv.1, 1
+ %exitcond.not = icmp eq i64 %iv.1.next, 462
+ br i1 %exitcond.not, label %exit, label %loop.header
+
+exit:
+ ret void
+}
More information about the llvm-commits
mailing list