blob: 650d4b497d12a9f922ab8ff25598f189fef6a266 [file] [log] [blame]
Gerolf Hoflehner5b4a67a2018-04-17 07:22:34 +00001; RUN: llc < %s
2
3; llc built with address sanitizer crashes because of a dangling node pointer
4; oss-fuzz - DAGCombiner::useDivRem (5011)
5
6define void @f() {
7BB:
8 %A19 = alloca i1**
9 %C18 = icmp ugt i1 true, false
10 %L13 = load i8, i8* undef
11 %L10 = load i8, i8* undef
12 %B12 = and i8 %L13, %L10
13 %B35 = and i8 %B12, %L10
14 %L2 = load i66*, i66** undef
15 %L23 = load i66, i66* %L2
16 %B38 = urem i8 %B35, %B12
17 %B9 = ashr i66 %L23, %L23
18 %C11 = icmp sge i8 %B38, %B35
19 %A4 = alloca i66
20 %G4 = getelementptr i66, i66* %A4, i1 true
21 %L6 = load i66, i66* %G4
22 %B21 = urem i1 %C11, true
23 %B1 = mul i66 %B9, %L23
24 %B5 = udiv i8 %L10, %L13
25 %B22 = udiv i66 %B9, %B1
26 %C29 = icmp ult i32 -1, 0
27 store i1* undef, i1** undef
28 store i1 %C29, i1* undef
29 br label %BB1
30
31BB1: ; preds = %BB
32 %G8 = getelementptr i66, i66* undef, i16 32767
33 %G43 = getelementptr i66, i66* undef, i66 -1
34 %L20 = load i1, i1* undef
35 %B7 = and i66 %L6, %L6
36 %B30 = sdiv i66 -36893488147419103232, -1
37 %B16 = urem i66 %B22, %L6
38 %G47 = getelementptr i66, i66* %G8, i66 %B16
39 store i66 %B7, i66* %G47
40 store i8 %B5, i8* undef
41 %C5 = icmp ult i1 %C18, %L20
42 store i66 %B30, i66* %G47
43 store i1** undef, i1*** %A19
44 store i1 %C5, i1* undef
45 store i1 %C11, i1* undef
46 store i66* %G43, i66** undef
47 store i1 %B21, i1* undef
48 %G59 = getelementptr i1, i1* undef, i1 false
49 %G61 = getelementptr i66, i66* %G8, i1 %L20
50 store i1 %L20, i1* %G59
51 store i66* %G61, i66** undef
52 ret void
53}