[LV] Fix determinism for failing scalable-call.ll test.
authorSander de Smalen <sander.desmalen@arm.com>
Thu, 15 Jul 2021 11:22:24 +0000 (12:22 +0100)
committerSander de Smalen <sander.desmalen@arm.com>
Thu, 15 Jul 2021 12:16:59 +0000 (13:16 +0100)
commitdc7bdc1e7121693df112f2fdb11cc6b88580ba4b
treeba04c64114a75b2f1af20f1f4d80d050a03c62b5
parent01bdb0f75efb2bb795a79cea9f3f918136d13a7f
[LV] Fix determinism for failing scalable-call.ll test.

The sort function for emitting an OptRemark was not deterministic,
which caused scalable-call.ll to fail on some buildbots. This patch
fixes that.

This patch also fixes an issue where `Instruction::comesBefore()`
is called when two Instructions are in different basic blocks,
which would otherwise cause an assertion failure.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/scalable-call.ll