OSDN Git Service

X86 fast-isel: Avoid explicit AH subreg reference for [SU]Rem.
authorJim Grosbach <grosbach@apple.com>
Tue, 9 Jul 2013 02:07:25 +0000 (02:07 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 9 Jul 2013 02:07:25 +0000 (02:07 +0000)
commitcc64dc66e740c0d78ecaca39c33c81b4062edd2e
treec965868d58e1dd764d7d9a77ee29ea43b0064dd2
parent845e196a52d52abcd789612750f6f34af3a2cc79
X86 fast-isel: Avoid explicit AH subreg reference for [SU]Rem.

Explicit references to %AH for an i8 remainder instruction can lead to
references to %AH in a REX prefixed instruction, which causes things to
blow up. Do the same thing in FastISel as we do for DAG isel and instead
shift %AX right by 8 bits and then extract the 8-bit subreg from that
result.

rdar://14203849
http://llvm.org/bugs/show_bug.cgi?id=16105

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185899 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FastISel.cpp