Expand invalid return values for umulo and smulo. Handle these similarly
authorEric Christopher <echristo@apple.com>
Thu, 20 Jan 2011 08:54:28 +0000 (08:54 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 20 Jan 2011 08:54:28 +0000 (08:54 +0000)
commit02050986d96d1880ec3015cb97c41d1dbad865d6
treebb1ed13e30fd7b8baf8919ce26d4bdc291c0eb97
parent907276dc4439c04d675fbcdb121cbede7a99ff9d
Expand invalid return values for umulo and smulo. Handle these similarly
to add/sub by doing the normal operation and then checking for overflow
afterwards. This generally relies on the DAG handling the later invalid
operations as well.

Fixes the 64-bit part of rdar://8622122 and rdar://8774702.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123908 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
test/CodeGen/X86/umulo-64.ll [new file with mode: 0644]