diff options
author | Karthika Devi C <quic_kartc@quicinc.com> | 2023-11-15 04:13:33 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 14:43:33 -0800 |
commit | 6726c99f8893c4a7bce00059416cb462237c64a0 (patch) | |
tree | 819184992487d175a3a1fefc481536fdf1b59098 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | d32df989546d30225184366013b8eedefe2ec6b0 (diff) | |
download | llvm-6726c99f8893c4a7bce00059416cb462237c64a0.zip llvm-6726c99f8893c4a7bce00059416cb462237c64a0.tar.gz llvm-6726c99f8893c4a7bce00059416cb462237c64a0.tar.bz2 |
[AArch64] Fix tryMergeAdjacentSTG function in PrologEpilog pass (#68873)
The tryMergeAdjacentSTG function tries to merge multiple
stg/st2g/stg_loop instructions. It doesn't verify the liveness of NZCV
flag before moving around STGloop which also alters NZCV flags. This was
not issue before the patch 5e612bc as these stack tag stores does not
alter the NZCV flags. But after the change, this merge function leads to
miscompilation because of control flow change in instructions. Added the
check to to see if the first instruction after insert point reads or
writes to NZCV flag and it's liveout state. This check happens after the
filling of merge list just before merge and bails out if necessary.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions