llvm-project/llvm/lib/MCA/HardwareUnits
Andrea Di Biagio 4a5b191703 [X86][MCA] Address the latest issues with MULX reported in PR51495.
It turns out that SchedWrite WriteIMulH was always assigned to the low half of
the result of a MULX (rather than to the high half).

To avoid confusion, this patch swaps the two MULX writes in the tablegen
definition of MULX32/64.  That way, write names better describe what they
actually refer to; this also avoids further complications if in future we decide
to reuse the same MulH writes to also model other scalar integer multiply
instructions.  I also had to swap the latency values for the two MULX writes to
make sure that the change is effectively an NFC. In fact, none of the existing
x86 tests were affected by this small refactoring.

This patch also fixes a bug in MCA: a wrong latency value was propagated for
instructions that perform multiple writes to a same register.  This last issue
was found by Roman while testing MULX on targets that define a different latency
for the Low/High part of the result.

Differential Revision: https://reviews.llvm.org/D108727
2021-08-26 12:08:20 +01:00
..
HardwareUnit.cpp
LSUnit.cpp [MCA][LSUnit] Fix a potential use after free in the logic that updates memory groups. 2021-04-20 13:30:45 +01:00
RegisterFile.cpp [X86][MCA] Address the latest issues with MULX reported in PR51495. 2021-08-26 12:08:20 +01:00
ResourceManager.cpp [MCA][InstrBuilder] Always check for implicit uses of resource units (PR50725). 2021-06-16 14:51:12 +01:00
RetireControlUnit.cpp [MCA] Disable RCU for InOrderIssueStage 2021-03-24 13:54:04 +03:00
Scheduler.cpp [llvm] Use llvm::append_range (NFC) 2021-01-06 18:27:33 -08:00