HomePhabricator

[Hexagon] Check isInstr() before getInstr() with SUnit

Authored by Xinglong on Thu, May 14, 6:38 AM.

Description

[Hexagon] Check isInstr() before getInstr() with SUnit

SUnit represent a MachineInstr in post-regalloc scheduling but SDNode
in pre-regalloc scheduling. when pass -enable-hexagon-sdnode-sched to
Hexagon backend with -O1 and above, this may cause an assertion failed.

Fixes PR45194.

Differential Revision: https://reviews.llvm.org/D76134

Details