Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

llc -cgp-verify-bfi-updates -O1 fails with "Freq mismatch: entry 8 vs 16" #45292

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR46322
Status NEW
Importance P enhancement
Reported by Mikael Holmén (mikael.holmen@ericsson.com)
Reported on 2020-06-15 01:31:33 -0700
Last modified on 2020-06-15 01:53:32 -0700
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments bbi-43598.ll (300 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 23615
bbi-43598.ll reproducer

Reproduce with:
 llc -cgp-verify-bfi-updates -O1 -o - bbi-43598.ll

Result:

Freq mismatch: entry 8 vs 16
This
block-frequency-info: a
 - entry: float = 1.0, int = 8

Other
block-frequency-info: a
 - entry: float = 1.0, int = 16
Quuxplusone commented 4 years ago

Attached bbi-43598.ll (300 bytes, text/plain): bbi-43598.ll reproducer

Quuxplusone commented 4 years ago
Some additional -debug printouts:

MERGING MOSTLY EMPTY BLOCKS - BEFORE:

land.rhs:                                         ; preds = %entry
  br label %land.end

land.end:                                         ; preds = %land.rhs, %entry
  ret void
AFTER:

land.end:                                         ; preds = %entry, %entry
  ret void

To merge:

land.end:                                         ; preds = %entry
  ret void

Merging: land.end into entry

I suppose CodeGenPrepare::eliminateMostlyEmptyBlock doesn't update BFI.