OSDN Git Service

[llvm-mca] Fixed a bug in the logic that checks if a memory operation is ready to...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 13 Jun 2018 18:30:14 +0000 (18:30 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 13 Jun 2018 18:30:14 +0000 (18:30 +0000)
commit2a8508d8ca6c3fb3f4b33438ec6ccd7111ffe8be
tree60f2d153284fe3fabaed4fce46455456dee22895
parenta71e59ebf7ff06a6c39d28d6fea4f9340c499d0f
[llvm-mca] Fixed a bug in the logic that checks if a memory operation is ready to execute.

Fixes PR37790.

In some (very rare) cases, the LSUnit (Load/Store unit) was wrongly marking a
load (or store) as "ready to execute" effectively bypassing older memory barrier
instructions.

To reproduce this bug, the memory barrier must be the first instruction in the
input assembly sequence, and it doesn't have to perform any register writes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334633 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-mca/X86/BtVer2/pr37790.s [new file with mode: 0644]
tools/llvm-mca/LSUnit.cpp