[llvm] fb14805 - Return "[Test] One more test to prevent crash in SLP vectorizer"

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 23:30:19 PDT 2022


Author: Max Kazantsev
Date: 2022-05-10T13:29:21+07:00
New Revision: fb148057c5488f403b4706f8ea724134604a546c

URL: https://github.com/llvm/llvm-project/commit/fb148057c5488f403b4706f8ea724134604a546c
DIFF: https://github.com/llvm/llvm-project/commit/fb148057c5488f403b4706f8ea724134604a546c.diff

LOG: Return "[Test] One more test to prevent crash in SLP vectorizer"

Looks like this test exposes some non-determinism and fails with
auth-generated checks. Recommited with sole check it didn't crash.
Will investigate why it happens.

Added: 
    

Modified: 
    llvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll b/llvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll
index 4aa4ce16cf7be..7155e7f9f76f9 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll
@@ -1,4 +1,3 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -slp-vectorizer < %s | FileCheck %s
 ; RUN: opt -S -passes=slp-vectorizer < %s | FileCheck %s
 
@@ -106,6 +105,85 @@ bb2:                                              ; preds = %bb2, %bb
   br label %bb2
 }
 
+; Make sure we don't crash.
+define i64 @test_3() #0 {
+; CHECK-LABEL: @test_3(
+bb:
+  br label %bb1
+
+bb1:                                              ; preds = %bb
+  br label %bb3
+
+bb2:                                              ; No predecessors!
+  br label %bb3
+
+bb3:                                              ; preds = %bb2, %bb1
+  %tmp = phi i32 [ undef, %bb1 ], [ undef, %bb2 ]
+  %tmp4 = phi i32 [ undef, %bb1 ], [ undef, %bb2 ]
+  %tmp5 = mul i32 %tmp, %tmp4
+  %tmp6 = mul i32 %tmp5, %tmp4
+  %tmp7 = mul i32 %tmp6, %tmp4
+  %tmp8 = mul i32 %tmp7, %tmp4
+  %tmp9 = mul i32 %tmp8, %tmp4
+  %tmp10 = mul i32 %tmp9, %tmp4
+  %tmp11 = mul i32 %tmp10, %tmp4
+  %tmp12 = mul i32 %tmp11, %tmp4
+  %tmp13 = mul i32 %tmp12, %tmp4
+  %tmp14 = mul i32 %tmp13, %tmp4
+  %tmp15 = mul i32 %tmp14, %tmp4
+  %tmp16 = mul i32 %tmp15, %tmp4
+  %tmp17 = mul i32 %tmp16, %tmp4
+  %tmp18 = mul i32 %tmp17, %tmp4
+  %tmp19 = mul i32 %tmp18, %tmp4
+  %tmp20 = mul i32 %tmp19, %tmp4
+  %tmp21 = mul i32 %tmp20, %tmp4
+  %tmp22 = mul i32 %tmp21, %tmp4
+  %tmp23 = mul i32 %tmp22, %tmp4
+  %tmp24 = mul i32 %tmp23, %tmp4
+  %tmp25 = mul i32 %tmp24, %tmp4
+  %tmp26 = mul i32 %tmp25, %tmp4
+  %tmp27 = mul i32 %tmp26, %tmp4
+  %tmp28 = mul i32 %tmp27, %tmp4
+  %tmp29 = mul i32 %tmp28, %tmp4
+  %tmp30 = mul i32 %tmp29, %tmp4
+  %tmp31 = mul i32 %tmp30, %tmp4
+  %tmp32 = mul i32 %tmp31, %tmp4
+  %tmp33 = mul i32 %tmp32, %tmp4
+  %tmp34 = mul i32 %tmp33, %tmp4
+  %tmp35 = mul i32 %tmp34, %tmp4
+  %tmp36 = mul i32 %tmp35, %tmp4
+  %tmp37 = mul i32 %tmp36, %tmp4
+  %tmp38 = mul i32 %tmp37, %tmp4
+  %tmp39 = mul i32 %tmp38, %tmp4
+  %tmp40 = mul i32 %tmp39, %tmp4
+  %tmp41 = mul i32 %tmp40, %tmp4
+  %tmp42 = mul i32 %tmp41, %tmp4
+  %tmp43 = mul i32 %tmp42, %tmp4
+  %tmp44 = mul i32 %tmp43, %tmp4
+  %tmp45 = mul i32 %tmp44, %tmp4
+  %tmp46 = mul i32 %tmp45, %tmp4
+  %tmp47 = mul i32 %tmp46, %tmp4
+  %tmp48 = mul i32 %tmp47, %tmp4
+  %tmp49 = mul i32 %tmp48, %tmp4
+  %tmp50 = mul i32 %tmp49, %tmp4
+  %tmp51 = mul i32 %tmp50, %tmp4
+  %tmp52 = mul i32 %tmp51, %tmp4
+  %tmp53 = mul i32 %tmp52, %tmp4
+  %tmp54 = mul i32 %tmp53, %tmp4
+  %tmp55 = mul i32 %tmp54, %tmp4
+  %tmp56 = mul i32 %tmp55, %tmp4
+  %tmp57 = mul i32 %tmp56, %tmp4
+  %tmp58 = mul i32 %tmp57, %tmp4
+  %tmp59 = mul i32 %tmp58, %tmp4
+  %tmp60 = mul i32 %tmp59, %tmp4
+  %tmp61 = mul i32 %tmp60, %tmp4
+  %tmp62 = mul i32 %tmp61, %tmp4
+  %tmp63 = mul i32 %tmp62, %tmp4
+  %tmp64 = add i32 undef, %tmp63
+  %tmp65 = sext i32 %tmp64 to i64
+  ret i64 %tmp65
+}
+
 declare void @use(i32) #0
 
 attributes #0 = { "target-features"="+sse4.1" }


        


More information about the llvm-commits mailing list