summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/Error.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2014-11-03 20:26:35 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2014-11-03 20:26:35 +0000
commit12eb558bd96a155fa9a1bbf9a27676571f23f7d0 (patch)
treeacb803d8e20af717c4b7674bc38072800caf3eba /llvm/tools/llvm-readobj/Error.cpp
parent1e16fa302e2c3f68ea8187e8b782397e0b24cd0f (diff)
downloadbcm5719-llvm-12eb558bd96a155fa9a1bbf9a27676571f23f7d0.tar.gz
bcm5719-llvm-12eb558bd96a155fa9a1bbf9a27676571f23f7d0.zip
[X86] 8bit divrem: Improve codegen for AH register extraction.
For 8-bit divrems where the remainder is used, we used to generate: divb %sil shrw $8, %ax movzbl %al, %eax That was to avoid an H-reg access, which is problematic mainly because it isn't possible in REX-prefixed instructions. This patch optimizes that to: divb %sil movzbl %ah, %eax To do that, we explicitly extend AH, and extract the L-subreg in the resulting register. The extension is done using the NOREX variants of MOVZX. To support signed operations, MOVSX_NOREX is also added. Further, this introduces a new SDNode type, [us]divrem_ext_hreg, which is then lowered to a sequence containing a single zext (rather than 2). Differential Revision: http://reviews.llvm.org/D6064 llvm-svn: 221176
Diffstat (limited to 'llvm/tools/llvm-readobj/Error.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud