From 0842ce85c1003157cd649ceebe72e37887dbb4cd Mon Sep 17 00:00:00 2001 From: Amanda Strnad Date: Fri, 4 Oct 2019 16:01:41 -0400 Subject: [PATCH] Change to a misleadingly similar function `setFlags` clears some flags, while `setFlag` only changes the specified flag. This resolves an issue where instructions weren't checked as target for both calls and branches. --- llvm/lib/Target/RISCV/ISPMetadataPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/ISPMetadataPass.cpp b/llvm/lib/Target/RISCV/ISPMetadataPass.cpp index c537fc90a24d..a80769a7c030 100644 --- a/llvm/lib/Target/RISCV/ISPMetadataPass.cpp +++ b/llvm/lib/Target/RISCV/ISPMetadataPass.cpp @@ -46,9 +46,9 @@ static void setMIFlags(MachineInstr *MI) { MI->setFlag(MachineInstr::FnEpilog); } else if ( MI->isCall() ) - MI->setFlags(MachineInstr::IsCall); + MI->setFlag(MachineInstr::IsCall); else if ( MI->isBranch() ) - MI->setFlags(MachineInstr::IsBranch); + MI->setFlag(MachineInstr::IsBranch); }