From e56fd916e3b0f2ba0255a6cc2c0715ec0ead0152 Mon Sep 17 00:00:00 2001 From: William Chen Date: Mon, 25 Jul 2022 15:01:46 -0700 Subject: [PATCH] Add checking of ListOpnd to peep's IfOperandIsLiveAfterInsn --- src/mapleall/maple_be/src/cg/peep.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mapleall/maple_be/src/cg/peep.cpp b/src/mapleall/maple_be/src/cg/peep.cpp index 687f07a760..4f5c37ad69 100644 --- a/src/mapleall/maple_be/src/cg/peep.cpp +++ b/src/mapleall/maple_be/src/cg/peep.cpp @@ -146,6 +146,11 @@ bool CGPeepPattern::IfOperandIsLiveAfterInsn(const RegOperand ®Opnd, Insn &in return true; } } + } else if (opnd.IsList()) { + auto &opndList = static_cast(opnd).GetOperands(); + if (find(opndList.begin(), opndList.end(), ®Opnd) != opndList.end()) { + return true; + } } if (!opnd.IsRegister()) { @@ -371,6 +376,11 @@ bool PeepPattern::IfOperandIsLiveAfterInsn(const RegOperand ®Opnd, Insn &insn return true; } } + } else if (opnd.IsList()) { + auto &opndList = static_cast(opnd).GetOperands(); + if (find(opndList.begin(), opndList.end(), ®Opnd) != opndList.end()) { + return true; + } } if (!opnd.IsRegister()) { -- Gitee