Unverified Commit 22760719 authored by Nemanja Ivanovic's avatar Nemanja Ivanovic Committed by GitHub
Browse files

[RISCV] Fix crash in PEI with empty entry block with Zcmp (#72117)



We check the opcode of the first instruction in the block where the
prologue is inserted without checking if the iterator points to any
instructions. When the basic block is empty, that causes a crash. One
way the prologue block can be empty is when it starts with a call to
__builtin_readcyclecounter on RV32 since that produces a loop.

Co-authored-by: default avatarNemanja Ivanovic <nemanja@synopsys.com>
parent 0765f645
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment