[AArch64] Fix scheduler crash in fusion code.
authorEli Friedman <efriedma@quicinc.com>
Thu, 20 Oct 2022 17:47:44 +0000 (10:47 -0700)
committerEli Friedman <efriedma@quicinc.com>
Thu, 20 Oct 2022 17:47:44 +0000 (10:47 -0700)
commitdecb743e80df803dfcb32ac8d175f9641af2f21c
treeaed3f1826dba0f7d6c258591a26ab2f3944f09ca
parent9db12a45e472e502f92dcc0bf1396162003f5f09
[AArch64] Fix scheduler crash in fusion code.

Make sure we don't call getReg() on the first operand of instruction
without knowing that operand is actually a register.

(This codepath isn't enabled for most CPUs; only triggers on certain
CPUs, like Cortex-X1.)

Differential Revision: https://reviews.llvm.org/D136296
llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
llvm/test/CodeGen/AArch64/misched-fusion-cmp.mir [new file with mode: 0644]