diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp index 2bbb187b293..f5933cbc8ca 100644 --- a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp +++ b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp @@ -367,9 +367,9 @@ bool X86SpeculativeLoadHardeningPass::runOnMachineFunction( ++NumLFENCEsInserted; } - // If we have no conditionals to protect in blocks, then all we needed to do - // was protect the entry and so we're done. - if (Infos.empty()) + // If we guarded the entry with an LFENCE and have no conditionals to protect + // in blocks, then we're done. + if (FenceCallAndRet && Infos.empty()) // We may have changed the function's code at this point to insert fences. return true; |