]> granicus.if.org Git - llvm/commit
[x86/SLH] Fix a bug where we would try to post-load harden non-GPRs.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 16 Jul 2018 11:38:48 +0000 (11:38 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 16 Jul 2018 11:38:48 +0000 (11:38 +0000)
commit7847cb2c366649c55596d25b0134fd74b921ecff
tree575ffc36b6e25cb106610518e6eec806a43e7081
parent06a94a9b18a8dc2c712df19fb9db163d016b8437
[x86/SLH] Fix a bug where we would try to post-load harden non-GPRs.

Found cases that hit the assert I added. This patch factors the validity
checking into a nice helper routine and calls it when deciding to harden
post-load, and asserts it when doing so later.

I've added tests for the various ways of loading a floating point type,
as well as loading all vector permutations. Even though many of these go
to identical instructions, it seems good to somewhat comprehensively
test them.

I'm confident there will be more fixes needed here, I'll try to add
tests each time as I get this predicate adjusted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337160 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86SpeculativeLoadHardening.cpp
test/CodeGen/X86/speculative-load-hardening.ll