OSDN Git Service

[X86] Make WRPKRU/RDPKRU pass -verify-machineinstrs
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 28 Jun 2016 16:04:46 +0000 (16:04 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 28 Jun 2016 16:04:46 +0000 (16:04 +0000)
commit89493fda7e69891f32d65968ec5061037c7dff28
treeea1a4de67da21213b0dfe362c0f34613f38d11a1
parenteeeea1e6dc7264e894d59f91b719e54067838466
[X86] Make WRPKRU/RDPKRU pass -verify-machineinstrs

The original implementation attempted to zero registers using
XOR %foo, %foo.  This is problematic because it constitutes a
read-modify-write of a register which might not be defined.

Instead, use MOV32r0 to avoid these problems; expandPostRAPseudo does
the right thing here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274024 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pku.ll