When both x/y and x%y are needed (x and y both scalar integer), compute
authorDan Gohman <gohman@apple.com>
Tue, 25 Sep 2007 18:23:27 +0000 (18:23 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 25 Sep 2007 18:23:27 +0000 (18:23 +0000)
commita37c9f7506af622b9f29a35466b33c650c75e9f7
tree4749c09d72e3e4f7fc9c436ac321fd9cca2f5a1b
parent798b4afd48ebc0acc165789ab913ccd28466ef68
When both x/y and x%y are needed (x and y both scalar integer), compute
both results with a single div or idiv instruction. This uses new X86ISD
nodes for DIV and IDIV which are introduced during the legalize phase
so that the SelectionDAG's CSE can automatically eliminate redundant
computations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42308 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
test/CodeGen/X86/divrem.ll [new file with mode: 0644]