[llvm-exegesis] Do not try to assign random registers twice.
authorClement Courbet <courbet@google.com>
Thu, 29 Oct 2020 10:48:43 +0000 (11:48 +0100)
committerClement Courbet <courbet@google.com>
Thu, 29 Oct 2020 12:27:35 +0000 (13:27 +0100)
commit24bf8faabd625c213e6275c7cd77d4883f564489
tree47a9da045cc1d4436ca09a33255dad092e09637a
parent184eb4fa4f1cc871692fa390261df8c25ddcc7ec
[llvm-exegesis] Do not try to assign random registers twice.

Doing a random assignment assigns both tested (forward) and back-to-back
(backward) instructions.

When none of the tested instruction and back-to-back instruction have
implicit aliasing, we're currently trying to do a random register
asignment twice.

Fix this (see PR26418).

Differential Revision: https://reviews.llvm.org/D90380
llvm/test/tools/llvm-exegesis/X86/latency-IN16rr.s [new file with mode: 0644]
llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp