Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / Transforms / SLPVectorizer / X86 / crash_7zip.ll
blob548a0fab6ad2ee69248c2d387a5691e1e47ca652
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-apple-macosx10.8.0"
7 %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334 = type { %struct._CLzmaProps.0.27.54.81.102.123.144.165.180.195.228.258.333, i16*, i8*, i8*, i32, i32, i64, i64, i32, i32, i32, [4 x i32], i32, i32, i32, i32, i32, [20 x i8] }
8 %struct._CLzmaProps.0.27.54.81.102.123.144.165.180.195.228.258.333 = type { i32, i32, i32, i32 }
10 define fastcc void @LzmaDec_DecodeReal2(%struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334* %p) {
11 ; CHECK-LABEL: @LzmaDec_DecodeReal2(
12 ; CHECK-NEXT:  entry:
13 ; CHECK-NEXT:    [[RANGE20_I:%.*]] = getelementptr inbounds [[STRUCT_CLZMADEC_1_28_55_82_103_124_145_166_181_196_229_259_334:%.*]], %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334* [[P:%.*]], i64 0, i32 4
14 ; CHECK-NEXT:    br label [[DO_BODY66_I:%.*]]
15 ; CHECK:       do.body66.i:
16 ; CHECK-NEXT:    [[TMP0:%.*]] = phi <2 x i32> [ [[TMP5:%.*]], [[DO_COND_I:%.*]] ], [ undef, [[ENTRY:%.*]] ]
17 ; CHECK-NEXT:    [[TMP1:%.*]] = select <2 x i1> undef, <2 x i32> undef, <2 x i32> [[TMP0]]
18 ; CHECK-NEXT:    [[TMP2:%.*]] = extractelement <2 x i32> [[TMP1]], i32 1
19 ; CHECK-NEXT:    [[TMP3:%.*]] = insertelement <2 x i32> undef, i32 [[TMP2]], i32 1
20 ; CHECK-NEXT:    br i1 undef, label [[DO_COND_I]], label [[IF_ELSE_I:%.*]]
21 ; CHECK:       if.else.i:
22 ; CHECK-NEXT:    [[TMP4:%.*]] = sub <2 x i32> [[TMP1]], undef
23 ; CHECK-NEXT:    br label [[DO_COND_I]]
24 ; CHECK:       do.cond.i:
25 ; CHECK-NEXT:    [[TMP5]] = phi <2 x i32> [ [[TMP4]], [[IF_ELSE_I]] ], [ [[TMP3]], [[DO_BODY66_I]] ]
26 ; CHECK-NEXT:    br i1 undef, label [[DO_BODY66_I]], label [[DO_END1006_I:%.*]]
27 ; CHECK:       do.end1006.i:
28 ; CHECK-NEXT:    [[TMP6:%.*]] = select <2 x i1> undef, <2 x i32> undef, <2 x i32> [[TMP5]]
29 ; CHECK-NEXT:    [[TMP7:%.*]] = bitcast i32* [[RANGE20_I]] to <2 x i32>*
30 ; CHECK-NEXT:    store <2 x i32> [[TMP6]], <2 x i32>* [[TMP7]], align 4
31 ; CHECK-NEXT:    ret void
33 entry:
34   %range20.i = getelementptr inbounds %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334, %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334* %p, i64 0, i32 4
35   %code21.i = getelementptr inbounds %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334, %struct.CLzmaDec.1.28.55.82.103.124.145.166.181.196.229.259.334* %p, i64 0, i32 5
36   br label %do.body66.i
38 do.body66.i:                                      ; preds = %do.cond.i, %entry
39   %range.2.i = phi i32 [ %range.4.i, %do.cond.i ], [ undef, %entry ]
40   %code.2.i = phi i32 [ %code.4.i, %do.cond.i ], [ undef, %entry ]
41   %.range.2.i = select i1 undef, i32 undef, i32 %range.2.i
42   %.code.2.i = select i1 undef, i32 undef, i32 %code.2.i
43   br i1 undef, label %do.cond.i, label %if.else.i
45 if.else.i:                                        ; preds = %do.body66.i
46   %sub91.i = sub i32 %.range.2.i, undef
47   %sub92.i = sub i32 %.code.2.i, undef
48   br label %do.cond.i
50 do.cond.i:                                        ; preds = %if.else.i, %do.body66.i
51   %range.4.i = phi i32 [ %sub91.i, %if.else.i ], [ undef, %do.body66.i ]
52   %code.4.i = phi i32 [ %sub92.i, %if.else.i ], [ %.code.2.i, %do.body66.i ]
53   br i1 undef, label %do.body66.i, label %do.end1006.i
55 do.end1006.i:                                     ; preds = %do.cond.i
56   %.range.4.i = select i1 undef, i32 undef, i32 %range.4.i
57   %.code.4.i = select i1 undef, i32 undef, i32 %code.4.i
58   store i32 %.range.4.i, i32* %range20.i, align 4
59   store i32 %.code.4.i, i32* %code21.i, align 4
60   ret void