# Changeset View

Changeset View

# Standalone View

Standalone View

# test/CodeGen/X86/misched-matrix.ll

1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||||
---|---|---|---|---|---|

1 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | 2 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | ||

2 | ; RUN: -misched-topdown -verify-machineinstrs \ | 3 | ; RUN: -misched-topdown -verify-machineinstrs \ | ||

3 | ; RUN: | FileCheck %s -check-prefix=TOPDOWN | 4 | ; RUN: | FileCheck %s -check-prefix=TOPDOWN | ||

4 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | 5 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | ||

5 | ; RUN: -misched=ilpmin -verify-machineinstrs \ | 6 | ; RUN: -misched=ilpmin -verify-machineinstrs \ | ||

6 | ; RUN: | FileCheck %s -check-prefix=ILPMIN | 7 | ; RUN: | FileCheck %s -check-prefix=ILPMIN | ||

7 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | 8 | ; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 -pre-RA-sched=source -enable-misched \ | ||

8 | ; RUN: -misched=ilpmax -verify-machineinstrs \ | 9 | ; RUN: -misched=ilpmax -verify-machineinstrs \ | ||

▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||

82 | ; ILPMAX: imull | 83 | ; ILPMAX: imull | ||

83 | ; ILPMAX: addl | 84 | ; ILPMAX: addl | ||

84 | ; ILPMAX: addl | 85 | ; ILPMAX: addl | ||

85 | ; ILPMAX: addl | 86 | ; ILPMAX: addl | ||

86 | ; ILPMAX: movl %{{.*}}, 12( | 87 | ; ILPMAX: movl %{{.*}}, 12( | ||

87 | ; ILPMAX-LABEL: %for.end | 88 | ; ILPMAX-LABEL: %for.end | ||

88 | 89 | | |||

89 | define void @mmult([4 x i32]* noalias nocapture %m1, [4 x i32]* noalias nocapture %m2, | 90 | define void @mmult([4 x i32]* noalias nocapture %m1, [4 x i32]* noalias nocapture %m2, | ||

91 | ; TOPDOWN-LABEL: mmult: | ||||

92 | ; TOPDOWN: # %bb.0: # %entry | ||||

93 | ; TOPDOWN-NEXT: pushq %rbp | ||||

94 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 16 | ||||

95 | ; TOPDOWN-NEXT: pushq %r15 | ||||

96 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 24 | ||||

97 | ; TOPDOWN-NEXT: pushq %r14 | ||||

98 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 32 | ||||

99 | ; TOPDOWN-NEXT: pushq %rbx | ||||

100 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 40 | ||||

101 | ; TOPDOWN-NEXT: .cfi_offset %rbx, -40 | ||||

102 | ; TOPDOWN-NEXT: .cfi_offset %r14, -32 | ||||

103 | ; TOPDOWN-NEXT: .cfi_offset %r15, -24 | ||||

104 | ; TOPDOWN-NEXT: .cfi_offset %rbp, -16 | ||||

105 | ; TOPDOWN-NEXT: xorl %eax, %eax | ||||

106 | ; TOPDOWN-NEXT: .p2align 4, 0x90 | ||||

107 | ; TOPDOWN-NEXT: .LBB0_1: # %for.body | ||||

108 | ; TOPDOWN-NEXT: # =>This Inner Loop Header: Depth=1 | ||||

109 | ; TOPDOWN-NEXT: movl (%rdi,%rax), %r10d | ||||

110 | ; TOPDOWN-NEXT: movl 4(%rdi,%rax), %r8d | ||||

111 | ; TOPDOWN-NEXT: movl 8(%rdi,%rax), %r9d | ||||

112 | ; TOPDOWN-NEXT: movl 12(%rdi,%rax), %r11d | ||||

113 | ; TOPDOWN-NEXT: movl (%rsi), %ecx | ||||

114 | ; TOPDOWN-NEXT: imull %r10d, %ecx | ||||

115 | ; TOPDOWN-NEXT: movl 16(%rsi), %ebx | ||||

116 | ; TOPDOWN-NEXT: imull %r8d, %ebx | ||||

117 | ; TOPDOWN-NEXT: addl %ecx, %ebx | ||||

118 | ; TOPDOWN-NEXT: movl 32(%rsi), %ebp | ||||

119 | ; TOPDOWN-NEXT: imull %r9d, %ebp | ||||

120 | ; TOPDOWN-NEXT: movl 48(%rsi), %r14d | ||||

121 | ; TOPDOWN-NEXT: imull %r11d, %r14d | ||||

122 | ; TOPDOWN-NEXT: addl %ebp, %r14d | ||||

123 | ; TOPDOWN-NEXT: addl %ebx, %r14d | ||||

124 | ; TOPDOWN-NEXT: movl 4(%rsi), %ebx | ||||

125 | ; TOPDOWN-NEXT: imull %r10d, %ebx | ||||

126 | ; TOPDOWN-NEXT: movl 20(%rsi), %ebp | ||||

127 | ; TOPDOWN-NEXT: imull %r8d, %ebp | ||||

128 | ; TOPDOWN-NEXT: addl %ebx, %ebp | ||||

129 | ; TOPDOWN-NEXT: movl 36(%rsi), %ebx | ||||

130 | ; TOPDOWN-NEXT: imull %r9d, %ebx | ||||

131 | ; TOPDOWN-NEXT: movl 52(%rsi), %ecx | ||||

132 | ; TOPDOWN-NEXT: imull %r11d, %ecx | ||||

133 | ; TOPDOWN-NEXT: addl %ebx, %ecx | ||||

134 | ; TOPDOWN-NEXT: addl %ebp, %ecx | ||||

135 | ; TOPDOWN-NEXT: movl 8(%rsi), %ebx | ||||

136 | ; TOPDOWN-NEXT: imull %r10d, %ebx | ||||

137 | ; TOPDOWN-NEXT: movl 24(%rsi), %ebp | ||||

138 | ; TOPDOWN-NEXT: imull %r8d, %ebp | ||||

139 | ; TOPDOWN-NEXT: addl %ebx, %ebp | ||||

140 | ; TOPDOWN-NEXT: movl 40(%rsi), %r15d | ||||

141 | ; TOPDOWN-NEXT: imull %r9d, %r15d | ||||

142 | ; TOPDOWN-NEXT: movl 56(%rsi), %ebx | ||||

143 | ; TOPDOWN-NEXT: imull %r11d, %ebx | ||||

144 | ; TOPDOWN-NEXT: addl %r15d, %ebx | ||||

145 | ; TOPDOWN-NEXT: addl %ebp, %ebx | ||||

146 | ; TOPDOWN-NEXT: imull 12(%rsi), %r10d | ||||

147 | ; TOPDOWN-NEXT: movl %r14d, (%rdx,%rax) | ||||

148 | ; TOPDOWN-NEXT: imull 28(%rsi), %r8d | ||||

149 | ; TOPDOWN-NEXT: addl %r10d, %r8d | ||||

150 | ; TOPDOWN-NEXT: movl %ecx, 4(%rdx,%rax) | ||||

151 | ; TOPDOWN-NEXT: imull 44(%rsi), %r9d | ||||

152 | ; TOPDOWN-NEXT: imull 60(%rsi), %r11d | ||||

153 | ; TOPDOWN-NEXT: addl %r9d, %r11d | ||||

154 | ; TOPDOWN-NEXT: addl %r8d, %r11d | ||||

155 | ; TOPDOWN-NEXT: movl %ebx, 8(%rdx,%rax) | ||||

156 | ; TOPDOWN-NEXT: movl %r11d, 12(%rdx,%rax) | ||||

157 | ; TOPDOWN-NEXT: addq $16, %rax | ||||

158 | ; TOPDOWN-NEXT: cmpl $64, %eax | ||||

159 | ; TOPDOWN-NEXT: jne .LBB0_1 | ||||

160 | ; TOPDOWN-NEXT: # %bb.2: # %for.end | ||||

161 | ; TOPDOWN-NEXT: popq %rbx | ||||

162 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 32 | ||||

163 | ; TOPDOWN-NEXT: popq %r14 | ||||

164 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 24 | ||||

165 | ; TOPDOWN-NEXT: popq %r15 | ||||

166 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 16 | ||||

167 | ; TOPDOWN-NEXT: popq %rbp | ||||

168 | ; TOPDOWN-NEXT: .cfi_def_cfa_offset 8 | ||||

169 | ; TOPDOWN-NEXT: retq | ||||

170 | ; | ||||

171 | ; ILPMIN-LABEL: mmult: | ||||

172 | ; ILPMIN: # %bb.0: # %entry | ||||

173 | ; ILPMIN-NEXT: pushq %rbp | ||||

174 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 16 | ||||

175 | ; ILPMIN-NEXT: pushq %r15 | ||||

176 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 24 | ||||

177 | ; ILPMIN-NEXT: pushq %r14 | ||||

178 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 32 | ||||

179 | ; ILPMIN-NEXT: pushq %rbx | ||||

180 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 40 | ||||

181 | ; ILPMIN-NEXT: .cfi_offset %rbx, -40 | ||||

182 | ; ILPMIN-NEXT: .cfi_offset %r14, -32 | ||||

183 | ; ILPMIN-NEXT: .cfi_offset %r15, -24 | ||||

184 | ; ILPMIN-NEXT: .cfi_offset %rbp, -16 | ||||

185 | ; ILPMIN-NEXT: xorl %r15d, %r15d | ||||

186 | ; ILPMIN-NEXT: .p2align 4, 0x90 | ||||

187 | ; ILPMIN-NEXT: .LBB0_1: # %for.body | ||||

188 | ; ILPMIN-NEXT: # =>This Inner Loop Header: Depth=1 | ||||

189 | ; ILPMIN-NEXT: movl (%rdi,%r15), %r8d | ||||

190 | ; ILPMIN-NEXT: movl 4(%rdi,%r15), %r9d | ||||

191 | ; ILPMIN-NEXT: movl 12(%rdi,%r15), %r14d | ||||

192 | ; ILPMIN-NEXT: movl 8(%rdi,%r15), %r10d | ||||

193 | ; ILPMIN-NEXT: movl 32(%rsi), %ebx | ||||

194 | ; ILPMIN-NEXT: movl 48(%rsi), %r11d | ||||

195 | ; ILPMIN-NEXT: movl (%rsi), %ebp | ||||

196 | ; ILPMIN-NEXT: movl 16(%rsi), %ecx | ||||

197 | ; ILPMIN-NEXT: imull %r8d, %ebp | ||||

198 | ; ILPMIN-NEXT: imull %r9d, %ecx | ||||

199 | ; ILPMIN-NEXT: addl %ebp, %ecx | ||||

200 | ; ILPMIN-NEXT: imull %r10d, %ebx | ||||

201 | ; ILPMIN-NEXT: imull %r14d, %r11d | ||||

202 | ; ILPMIN-NEXT: addl %ebx, %r11d | ||||

203 | ; ILPMIN-NEXT: addl %ecx, %r11d | ||||

204 | ; ILPMIN-NEXT: movl %r11d, (%rdx,%r15) | ||||

205 | ; ILPMIN-NEXT: movl 4(%rsi), %ecx | ||||

206 | ; ILPMIN-NEXT: movl 20(%rsi), %ebp | ||||

207 | ; ILPMIN-NEXT: movl 52(%rsi), %ebx | ||||

208 | ; ILPMIN-NEXT: movl 36(%rsi), %eax | ||||

209 | ; ILPMIN-NEXT: imull %r8d, %ecx | ||||

210 | ; ILPMIN-NEXT: imull %r9d, %ebp | ||||

211 | ; ILPMIN-NEXT: addl %ecx, %ebp | ||||

212 | ; ILPMIN-NEXT: imull %r10d, %eax | ||||

213 | ; ILPMIN-NEXT: imull %r14d, %ebx | ||||

214 | ; ILPMIN-NEXT: addl %eax, %ebx | ||||

215 | ; ILPMIN-NEXT: addl %ebp, %ebx | ||||

216 | ; ILPMIN-NEXT: movl %ebx, 4(%rdx,%r15) | ||||

217 | ; ILPMIN-NEXT: movl 8(%rsi), %eax | ||||

218 | ; ILPMIN-NEXT: movl 24(%rsi), %ecx | ||||

219 | ; ILPMIN-NEXT: movl 56(%rsi), %ebp | ||||

220 | ; ILPMIN-NEXT: movl 40(%rsi), %ebx | ||||

221 | ; ILPMIN-NEXT: imull %r8d, %eax | ||||

222 | ; ILPMIN-NEXT: imull %r9d, %ecx | ||||

223 | ; ILPMIN-NEXT: addl %eax, %ecx | ||||

224 | ; ILPMIN-NEXT: imull %r10d, %ebx | ||||

225 | ; ILPMIN-NEXT: imull %r14d, %ebp | ||||

226 | ; ILPMIN-NEXT: addl %ebx, %ebp | ||||

227 | ; ILPMIN-NEXT: addl %ecx, %ebp | ||||

228 | ; ILPMIN-NEXT: movl %ebp, 8(%rdx,%r15) | ||||

229 | ; ILPMIN-NEXT: imull 12(%rsi), %r8d | ||||

230 | ; ILPMIN-NEXT: imull 28(%rsi), %r9d | ||||

231 | ; ILPMIN-NEXT: addl %r8d, %r9d | ||||

232 | ; ILPMIN-NEXT: imull 44(%rsi), %r10d | ||||

233 | ; ILPMIN-NEXT: imull 60(%rsi), %r14d | ||||

234 | ; ILPMIN-NEXT: addl %r10d, %r14d | ||||

235 | ; ILPMIN-NEXT: addl %r9d, %r14d | ||||

236 | ; ILPMIN-NEXT: movl %r14d, 12(%rdx,%r15) | ||||

237 | ; ILPMIN-NEXT: addq $16, %r15 | ||||

238 | ; ILPMIN-NEXT: cmpl $64, %r15d | ||||

239 | ; ILPMIN-NEXT: jne .LBB0_1 | ||||

240 | ; ILPMIN-NEXT: # %bb.2: # %for.end | ||||

241 | ; ILPMIN-NEXT: popq %rbx | ||||

242 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 32 | ||||

243 | ; ILPMIN-NEXT: popq %r14 | ||||

244 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 24 | ||||

245 | ; ILPMIN-NEXT: popq %r15 | ||||

246 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 16 | ||||

247 | ; ILPMIN-NEXT: popq %rbp | ||||

248 | ; ILPMIN-NEXT: .cfi_def_cfa_offset 8 | ||||

249 | ; ILPMIN-NEXT: retq | ||||

250 | ; | ||||

251 | ; ILPMAX-LABEL: mmult: | ||||

252 | ; ILPMAX: # %bb.0: # %entry | ||||

253 | ; ILPMAX-NEXT: pushq %rbp | ||||

254 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 16 | ||||

255 | ; ILPMAX-NEXT: pushq %r15 | ||||

256 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 24 | ||||

257 | ; ILPMAX-NEXT: pushq %r14 | ||||

258 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 32 | ||||

259 | ; ILPMAX-NEXT: pushq %rbx | ||||

260 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 40 | ||||

261 | ; ILPMAX-NEXT: .cfi_offset %rbx, -40 | ||||

262 | ; ILPMAX-NEXT: .cfi_offset %r14, -32 | ||||

263 | ; ILPMAX-NEXT: .cfi_offset %r15, -24 | ||||

264 | ; ILPMAX-NEXT: .cfi_offset %rbp, -16 | ||||

265 | ; ILPMAX-NEXT: xorl %r15d, %r15d | ||||

266 | ; ILPMAX-NEXT: .p2align 4, 0x90 | ||||

267 | ; ILPMAX-NEXT: .LBB0_1: # %for.body | ||||

268 | ; ILPMAX-NEXT: # =>This Inner Loop Header: Depth=1 | ||||

269 | ; ILPMAX-NEXT: movl 12(%rdi,%r15), %r14d | ||||

270 | ; ILPMAX-NEXT: movl 8(%rdi,%r15), %r8d | ||||

271 | ; ILPMAX-NEXT: movl (%rdi,%r15), %r10d | ||||

272 | ; ILPMAX-NEXT: movl 4(%rdi,%r15), %r9d | ||||

273 | ; ILPMAX-NEXT: movl 32(%rsi), %ebx | ||||

274 | ; ILPMAX-NEXT: imull %r8d, %ebx | ||||

275 | ; ILPMAX-NEXT: movl 16(%rsi), %ebp | ||||

276 | ; ILPMAX-NEXT: imull %r9d, %ebp | ||||

277 | ; ILPMAX-NEXT: movl (%rsi), %ecx | ||||

278 | ; ILPMAX-NEXT: imull %r10d, %ecx | ||||

279 | ; ILPMAX-NEXT: movl 48(%rsi), %r11d | ||||

280 | ; ILPMAX-NEXT: imull %r14d, %r11d | ||||

281 | ; ILPMAX-NEXT: addl %ecx, %ebp | ||||

282 | ; ILPMAX-NEXT: addl %ebx, %r11d | ||||

283 | ; ILPMAX-NEXT: addl %ebp, %r11d | ||||

284 | ; ILPMAX-NEXT: movl %r11d, (%rdx,%r15) | ||||

285 | ; ILPMAX-NEXT: movl 20(%rsi), %ecx | ||||

286 | ; ILPMAX-NEXT: imull %r9d, %ecx | ||||

287 | ; ILPMAX-NEXT: movl 4(%rsi), %ebp | ||||

288 | ; ILPMAX-NEXT: imull %r10d, %ebp | ||||

289 | ; ILPMAX-NEXT: movl 36(%rsi), %ebx | ||||

290 | ; ILPMAX-NEXT: imull %r8d, %ebx | ||||

291 | ; ILPMAX-NEXT: movl 52(%rsi), %eax | ||||

292 | ; ILPMAX-NEXT: imull %r14d, %eax | ||||

293 | ; ILPMAX-NEXT: addl %ebp, %ecx | ||||

294 | ; ILPMAX-NEXT: addl %ebx, %eax | ||||

295 | ; ILPMAX-NEXT: addl %ecx, %eax | ||||

296 | ; ILPMAX-NEXT: movl %eax, 4(%rdx,%r15) | ||||

297 | ; ILPMAX-NEXT: movl 24(%rsi), %eax | ||||

298 | ; ILPMAX-NEXT: imull %r9d, %eax | ||||

299 | ; ILPMAX-NEXT: movl 8(%rsi), %ecx | ||||

300 | ; ILPMAX-NEXT: imull %r10d, %ecx | ||||

301 | ; ILPMAX-NEXT: movl 40(%rsi), %ebp | ||||

302 | ; ILPMAX-NEXT: imull %r8d, %ebp | ||||

303 | ; ILPMAX-NEXT: movl 56(%rsi), %ebx | ||||

304 | ; ILPMAX-NEXT: imull %r14d, %ebx | ||||

305 | ; ILPMAX-NEXT: addl %ecx, %eax | ||||

306 | ; ILPMAX-NEXT: addl %ebp, %ebx | ||||

307 | ; ILPMAX-NEXT: addl %eax, %ebx | ||||

308 | ; ILPMAX-NEXT: movl %ebx, 8(%rdx,%r15) | ||||

309 | ; ILPMAX-NEXT: imull 12(%rsi), %r10d | ||||

310 | ; ILPMAX-NEXT: imull 28(%rsi), %r9d | ||||

311 | ; ILPMAX-NEXT: imull 44(%rsi), %r8d | ||||

312 | ; ILPMAX-NEXT: imull 60(%rsi), %r14d | ||||

313 | ; ILPMAX-NEXT: addl %r10d, %r9d | ||||

314 | ; ILPMAX-NEXT: addl %r8d, %r14d | ||||

315 | ; ILPMAX-NEXT: addl %r9d, %r14d | ||||

316 | ; ILPMAX-NEXT: movl %r14d, 12(%rdx,%r15) | ||||

317 | ; ILPMAX-NEXT: addq $16, %r15 | ||||

318 | ; ILPMAX-NEXT: cmpl $64, %r15d | ||||

319 | ; ILPMAX-NEXT: jne .LBB0_1 | ||||

320 | ; ILPMAX-NEXT: # %bb.2: # %for.end | ||||

321 | ; ILPMAX-NEXT: popq %rbx | ||||

322 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 32 | ||||

323 | ; ILPMAX-NEXT: popq %r14 | ||||

324 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 24 | ||||

325 | ; ILPMAX-NEXT: popq %r15 | ||||

326 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 16 | ||||

327 | ; ILPMAX-NEXT: popq %rbp | ||||

328 | ; ILPMAX-NEXT: .cfi_def_cfa_offset 8 | ||||

329 | ; ILPMAX-NEXT: retq | ||||

90 | [4 x i32]* noalias nocapture %m3) nounwind uwtable ssp { | 330 | [4 x i32]* noalias nocapture %m3) nounwind uwtable ssp { | ||

91 | entry: | 331 | entry: | ||

92 | br label %for.body | 332 | br label %for.body | ||

93 | 333 | | |||

94 | for.body: ; preds = %for.body, %entry | 334 | for.body: ; preds = %for.body, %entry | ||

95 | %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] | 335 | %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] | ||

96 | %arrayidx8 = getelementptr inbounds [4 x i32], [4 x i32]* %m1, i64 %indvars.iv, i64 0 | 336 | %arrayidx8 = getelementptr inbounds [4 x i32], [4 x i32]* %m1, i64 %indvars.iv, i64 0 | ||

97 | %tmp = load i32, i32* %arrayidx8, align 4 | 337 | %tmp = load i32, i32* %arrayidx8, align 4 | ||

▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |