[PATCH] D53653: [Spectre] Fix MIR verifier errors in retpoline thunks
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 24 09:27:25 PDT 2018
rnk created this revision.
rnk added reviewers: thegameg, chandlerc, echristo.
Herald added a subscriber: hiraditya.
The main challenge here is that X86InstrInfo::AnalyzeBranch doesn't
understand the way we're using a CALL instruction as a branch, so we
can't list the CallTarget MBB as a successor of the entry block. If we
don't list it as a successor, then the AsmPrinter doesn't print a label
for the MBB.
Fix the issue by inserting our own label at the beginning of the call
target block. We can rely on the AsmPrinter to always emit it, even
though the block appears to be unreachable, but address-taken.
Fixes PR38391.
https://reviews.llvm.org/D53653
Files:
llvm/lib/Target/X86/X86RetpolineThunks.cpp
llvm/test/CodeGen/X86/retpoline.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53653.170913.patch
Type: text/x-patch
Size: 6392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181024/dce79f09/attachment.bin>
More information about the llvm-commits
mailing list