llvm.org GIT mirror llvm / 0636291
Revert 166726 because it may have broken a number of SPEC tests. PR14183. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166739 91177308-0d34-0410-b5e6-96231b3b80d8 Nadav Rotem 8 years ago
2 changed file(s) with 2 addition(s) and 54 deletion(s). Raw diff Collapse all Expand all
436436 if (SrcTy->isPointerTy())
437437 SrcBitWidth = TD->getTypeSizeInBits(SrcTy);
438438 else
439 SrcBitWidth = TD->getTypeSizeInBits(SrcTy->getScalarType());
440
441 assert(SrcBitWidth && "SrcBitWidth can't be zero");
439 SrcBitWidth = SrcTy->getScalarSizeInBits();
440
442441 KnownZero = KnownZero.zextOrTrunc(SrcBitWidth);
443442 KnownOne = KnownOne.zextOrTrunc(SrcBitWidth);
444443 ComputeMaskedBits(I->getOperand(0), KnownZero, KnownOne, TD, Depth+1);
+0
-51
test/Transforms/InstCombine/2012-10-25-vector-of-pointers.ll less more
None ; RUN: opt < %s -instcombine -S
1
2 ; Make sure that we don't crash when optimizing the vectors of pointers.
3
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"
6
7 %struct.hoge = type { double*, double*, double*, double** }
8
9 define void @widget(%struct.hoge* nocapture %arg) nounwind uwtable ssp {
10 bb:
11 %tmp = getelementptr inbounds %struct.hoge* %arg, i64 0, i32 0
12 br i1 undef, label %bb1, label %bb17
13
14 bb1: ; preds = %bb
15 br i1 undef, label %bb2, label %bb3
16
17 bb2: ; preds = %bb1
18 br label %bb17
19
20 bb3: ; preds = %bb1
21 %tmp4 = bitcast double** %tmp to <2 x double*>*
22 %tmp5 = load <2 x double*>* %tmp4, align 8
23 %tmp6 = ptrtoint <2 x double*> %tmp5 to <2 x i64>
24 %tmp7 = sub <2 x i64> zeroinitializer, %tmp6
25 %tmp8 = ashr exact <2 x i64> %tmp7,
26 %tmp9 = extractelement <2 x i64> %tmp8, i32 0
27 %tmp10 = add nsw i64 undef, %tmp9
28 br i1 undef, label %bb11, label %bb12
29
30 bb11: ; preds = %bb3
31 br label %bb13
32
33 bb12: ; preds = %bb3
34 br label %bb13
35
36 bb13: ; preds = %bb12, %bb11
37 br i1 undef, label %bb16, label %bb14
38
39 bb14: ; preds = %bb13
40 br i1 undef, label %bb16, label %bb15
41
42 bb15: ; preds = %bb14
43 br label %bb16
44
45 bb16: ; preds = %bb15, %bb14, %bb13
46 unreachable
47
48 bb17: ; preds = %bb2, %bb
49 ret void
50 }