llvm.org GIT mirror llvm / 366b5fa
Merging r310481, r310492 and r310510: ------------------------------------------------------------------------ r310481 | davide | 2017-08-09 08:13:50 -0700 (Wed, 09 Aug 2017) | 8 lines [ValueTracking] Honour recursion limit. The recently improved support for `icmp` in ValueTracking (r307304) exposes the fact that `isImplied` condition doesn't really bail out if we hit the recursion limit (and calls `computeKnownBits` which increases the depth and asserts). Differential Revision: https://reviews.llvm.org/D36512 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r310492 | davide | 2017-08-09 09:06:04 -0700 (Wed, 09 Aug 2017) | 1 line [ValueTracking] Update tests to unbreak the bots. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r310510 | spatel | 2017-08-09 11:56:26 -0700 (Wed, 09 Aug 2017) | 6 lines [SimplifyCFG] remove checks for crasher test from r310481 Not sure why the earlier version would fail, but trying to get the bots (and my local machine) to pass again. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@310634 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 3 years ago
2 changed file(s) with 78 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
44574457 unsigned Depth, AssumptionCache *AC,
44584458 const Instruction *CxtI,
44594459 const DominatorTree *DT) {
4460 // Bail out when we hit the limit.
4461 if (Depth == MaxDepth)
4462 return None;
4463
44604464 // A mismatch occurs when we compare a scalar cmp to a vector cmp, for example.
44614465 if (LHS->getType() != RHS->getType())
44624466 return None;
0 ; RUN: opt -simplifycfg -S < %s | FileCheck %s
1
2 ; Just checking for lack of crash here, but we should be able to check the IR?
3 ; Earlier version using auto-generated checks from utils/update_test_checks.py
4 ; had bot problems though...
5
6 define void @patatino() {
7
8 ; CHECK-LABEL: @patatino
9
10 br label %bb1
11 bb1: ; preds = %bb36, %0
12 br label %bb2
13 bb2: ; preds = %bb3, %bb1
14 br i1 undef, label %bb4, label %bb3
15 bb3: ; preds = %bb4, %bb2
16 br i1 undef, label %bb2, label %bb5
17 bb4: ; preds = %bb2
18 switch i32 undef, label %bb3 [
19 ]
20 bb5: ; preds = %bb3
21 br label %bb6
22 bb6: ; preds = %bb5
23 br i1 undef, label %bb7, label %bb9
24 bb7: ; preds = %bb6
25 %tmp = or i64 undef, 1
26 %tmp8 = icmp ult i64 %tmp, 0
27 br i1 %tmp8, label %bb12, label %bb9
28 bb9: ; preds = %bb35, %bb34, %bb33, %bb32, %bb31, %bb30, %bb27, %bb24, %bb21, %bb18, %bb16, %bb14, %bb12, %bb7, %bb6
29 br label %bb11
30 bb10: ; preds = %bb36
31 br label %bb11
32 bb11: ; preds = %bb10, %bb9
33 ret void
34 bb12: ; preds = %bb7
35 %tmp13 = icmp ult i64 0, 0
36 br i1 %tmp13, label %bb14, label %bb9
37 bb14: ; preds = %bb12
38 %tmp15 = icmp ult i64 undef, 0
39 br i1 %tmp15, label %bb16, label %bb9
40 bb16: ; preds = %bb14
41 %tmp17 = icmp ult i64 undef, 0
42 br i1 %tmp17, label %bb18, label %bb9
43 bb18: ; preds = %bb16
44 %tmp19 = or i64 undef, 5
45 %tmp20 = icmp ult i64 %tmp19, 0
46 br i1 %tmp20, label %bb21, label %bb9
47 bb21: ; preds = %bb18
48 %tmp22 = or i64 undef, 6
49 %tmp23 = icmp ult i64 %tmp22, 0
50 br i1 %tmp23, label %bb24, label %bb9
51 bb24: ; preds = %bb21
52 %tmp25 = or i64 undef, 7
53 %tmp26 = icmp ult i64 %tmp25, 0
54 br i1 %tmp26, label %bb27, label %bb9
55 bb27: ; preds = %bb24
56 %tmp28 = or i64 undef, 8
57 %tmp29 = icmp ult i64 %tmp28, 0
58 br i1 %tmp29, label %bb30, label %bb9
59 bb30: ; preds = %bb27
60 br i1 undef, label %bb31, label %bb9
61 bb31: ; preds = %bb30
62 br i1 undef, label %bb32, label %bb9
63 bb32: ; preds = %bb31
64 br i1 undef, label %bb33, label %bb9
65 bb33: ; preds = %bb32
66 br i1 undef, label %bb34, label %bb9
67 bb34: ; preds = %bb33
68 br i1 undef, label %bb35, label %bb9
69 bb35: ; preds = %bb34
70 br i1 undef, label %bb36, label %bb9
71 bb36: ; preds = %bb35
72 br i1 undef, label %bb1, label %bb10
73 }