mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
3f23d4b8c3
tryLatency compares two sched candidates. For the top zone it prefers the one with lesser depth, but only if that depth is greater than the total latency of the instructions we've already scheduled -- otherwise its latency would be hidden and there would be no stall. Unfortunately it only tests the depth of one of the candidates. This can lead to situations where the TopDepthReduce heuristic does not kick in, but a lower priority heuristic chooses the other candidate, whose depth *is* greater than the already scheduled latency, which causes a stall. The fix is to apply the heuristic if the depth of *either* candidate is greater than the already scheduled latency. All this also applies to the BotHeightReduce heuristic in the bottom zone. Differential Revision: https://reviews.llvm.org/D72392
19 lines
939 B
YAML
19 lines
939 B
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -run-pass=postmisched -o - %s | FileCheck %s
|
|
---
|
|
# Check that postmisched's TopDepthReduce heuristic moves the MULLD later
|
|
# because of the dependency on x5
|
|
name: test
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: test
|
|
; CHECK: renamable $x5 = LD 0, killed renamable $x5 :: (load 8)
|
|
; CHECK: renamable $x4 = LD 0, killed renamable $x4 :: (load 8)
|
|
; CHECK: renamable $x5 = MULLD killed renamable $x5, renamable $x3
|
|
; CHECK: renamable $x3 = MADDLD8 killed renamable $x4, killed renamable $x3, killed renamable $x5
|
|
renamable $x5 = LD 0, killed renamable $x5 :: (load 8)
|
|
renamable $x5 = MULLD killed renamable $x5, renamable $x3
|
|
renamable $x4 = LD 0, killed renamable $x4 :: (load 8)
|
|
renamable $x3 = MADDLD8 killed renamable $x4, killed renamable $x3, killed renamable $x5
|
|
...
|