• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; XFAIL: *
2; ...should pass. See PR12324: misched bringup
3; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu > %t
4; RUN: not grep xor %t
5; RUN: not grep movap %t
6; RUN: grep "\.quad.*0" %t
7
8; Remat should be able to fold the zero constant into the div instructions
9; as a constant-pool load.
10
11define void @foo(double* nocapture %x, double* nocapture %y) nounwind {
12entry:
13  %tmp1 = load double, double* %x                         ; <double> [#uses=1]
14  %arrayidx4 = getelementptr inbounds double, double* %x, i64 1 ; <double*> [#uses=1]
15  %tmp5 = load double, double* %arrayidx4                 ; <double> [#uses=1]
16  %arrayidx8 = getelementptr inbounds double, double* %x, i64 2 ; <double*> [#uses=1]
17  %tmp9 = load double, double* %arrayidx8                 ; <double> [#uses=1]
18  %arrayidx12 = getelementptr inbounds double, double* %x, i64 3 ; <double*> [#uses=1]
19  %tmp13 = load double, double* %arrayidx12               ; <double> [#uses=1]
20  %arrayidx16 = getelementptr inbounds double, double* %x, i64 4 ; <double*> [#uses=1]
21  %tmp17 = load double, double* %arrayidx16               ; <double> [#uses=1]
22  %arrayidx20 = getelementptr inbounds double, double* %x, i64 5 ; <double*> [#uses=1]
23  %tmp21 = load double, double* %arrayidx20               ; <double> [#uses=1]
24  %arrayidx24 = getelementptr inbounds double, double* %x, i64 6 ; <double*> [#uses=1]
25  %tmp25 = load double, double* %arrayidx24               ; <double> [#uses=1]
26  %arrayidx28 = getelementptr inbounds double, double* %x, i64 7 ; <double*> [#uses=1]
27  %tmp29 = load double, double* %arrayidx28               ; <double> [#uses=1]
28  %arrayidx32 = getelementptr inbounds double, double* %x, i64 8 ; <double*> [#uses=1]
29  %tmp33 = load double, double* %arrayidx32               ; <double> [#uses=1]
30  %arrayidx36 = getelementptr inbounds double, double* %x, i64 9 ; <double*> [#uses=1]
31  %tmp37 = load double, double* %arrayidx36               ; <double> [#uses=1]
32  %arrayidx40 = getelementptr inbounds double, double* %x, i64 10 ; <double*> [#uses=1]
33  %tmp41 = load double, double* %arrayidx40               ; <double> [#uses=1]
34  %arrayidx44 = getelementptr inbounds double, double* %x, i64 11 ; <double*> [#uses=1]
35  %tmp45 = load double, double* %arrayidx44               ; <double> [#uses=1]
36  %arrayidx48 = getelementptr inbounds double, double* %x, i64 12 ; <double*> [#uses=1]
37  %tmp49 = load double, double* %arrayidx48               ; <double> [#uses=1]
38  %arrayidx52 = getelementptr inbounds double, double* %x, i64 13 ; <double*> [#uses=1]
39  %tmp53 = load double, double* %arrayidx52               ; <double> [#uses=1]
40  %arrayidx56 = getelementptr inbounds double, double* %x, i64 14 ; <double*> [#uses=1]
41  %tmp57 = load double, double* %arrayidx56               ; <double> [#uses=1]
42  %arrayidx60 = getelementptr inbounds double, double* %x, i64 15 ; <double*> [#uses=1]
43  %tmp61 = load double, double* %arrayidx60               ; <double> [#uses=1]
44  %arrayidx64 = getelementptr inbounds double, double* %x, i64 16 ; <double*> [#uses=1]
45  %tmp65 = load double, double* %arrayidx64               ; <double> [#uses=1]
46  %div = fdiv double %tmp1, 0.000000e+00          ; <double> [#uses=1]
47  store double %div, double* %y
48  %div70 = fdiv double %tmp5, 2.000000e-01        ; <double> [#uses=1]
49  %arrayidx72 = getelementptr inbounds double, double* %y, i64 1 ; <double*> [#uses=1]
50  store double %div70, double* %arrayidx72
51  %div74 = fdiv double %tmp9, 2.000000e-01        ; <double> [#uses=1]
52  %arrayidx76 = getelementptr inbounds double, double* %y, i64 2 ; <double*> [#uses=1]
53  store double %div74, double* %arrayidx76
54  %div78 = fdiv double %tmp13, 2.000000e-01       ; <double> [#uses=1]
55  %arrayidx80 = getelementptr inbounds double, double* %y, i64 3 ; <double*> [#uses=1]
56  store double %div78, double* %arrayidx80
57  %div82 = fdiv double %tmp17, 2.000000e-01       ; <double> [#uses=1]
58  %arrayidx84 = getelementptr inbounds double, double* %y, i64 4 ; <double*> [#uses=1]
59  store double %div82, double* %arrayidx84
60  %div86 = fdiv double %tmp21, 2.000000e-01       ; <double> [#uses=1]
61  %arrayidx88 = getelementptr inbounds double, double* %y, i64 5 ; <double*> [#uses=1]
62  store double %div86, double* %arrayidx88
63  %div90 = fdiv double %tmp25, 2.000000e-01       ; <double> [#uses=1]
64  %arrayidx92 = getelementptr inbounds double, double* %y, i64 6 ; <double*> [#uses=1]
65  store double %div90, double* %arrayidx92
66  %div94 = fdiv double %tmp29, 2.000000e-01       ; <double> [#uses=1]
67  %arrayidx96 = getelementptr inbounds double, double* %y, i64 7 ; <double*> [#uses=1]
68  store double %div94, double* %arrayidx96
69  %div98 = fdiv double %tmp33, 2.000000e-01       ; <double> [#uses=1]
70  %arrayidx100 = getelementptr inbounds double, double* %y, i64 8 ; <double*> [#uses=1]
71  store double %div98, double* %arrayidx100
72  %div102 = fdiv double %tmp37, 2.000000e-01      ; <double> [#uses=1]
73  %arrayidx104 = getelementptr inbounds double, double* %y, i64 9 ; <double*> [#uses=1]
74  store double %div102, double* %arrayidx104
75  %div106 = fdiv double %tmp41, 2.000000e-01      ; <double> [#uses=1]
76  %arrayidx108 = getelementptr inbounds double, double* %y, i64 10 ; <double*> [#uses=1]
77  store double %div106, double* %arrayidx108
78  %div110 = fdiv double %tmp45, 2.000000e-01      ; <double> [#uses=1]
79  %arrayidx112 = getelementptr inbounds double, double* %y, i64 11 ; <double*> [#uses=1]
80  store double %div110, double* %arrayidx112
81  %div114 = fdiv double %tmp49, 2.000000e-01      ; <double> [#uses=1]
82  %arrayidx116 = getelementptr inbounds double, double* %y, i64 12 ; <double*> [#uses=1]
83  store double %div114, double* %arrayidx116
84  %div118 = fdiv double %tmp53, 2.000000e-01      ; <double> [#uses=1]
85  %arrayidx120 = getelementptr inbounds double, double* %y, i64 13 ; <double*> [#uses=1]
86  store double %div118, double* %arrayidx120
87  %div122 = fdiv double %tmp57, 2.000000e-01      ; <double> [#uses=1]
88  %arrayidx124 = getelementptr inbounds double, double* %y, i64 14 ; <double*> [#uses=1]
89  store double %div122, double* %arrayidx124
90  %div126 = fdiv double %tmp61, 2.000000e-01      ; <double> [#uses=1]
91  %arrayidx128 = getelementptr inbounds double, double* %y, i64 15 ; <double*> [#uses=1]
92  store double %div126, double* %arrayidx128
93  %div130 = fdiv double %tmp65, 0.000000e+00      ; <double> [#uses=1]
94  %arrayidx132 = getelementptr inbounds double, double* %y, i64 16 ; <double*> [#uses=1]
95  store double %div130, double* %arrayidx132
96  ret void
97}
98