summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/v6m-smul-with-overflow.ll
Commit message (Collapse)AuthorAgeFilesLines
* Fix signed multiplication with overflow fallback.Ranjeet Singh2017-04-261-0/+16
For targets that don't have ISD::MULHS or ISD::SMUL_LOHI for the type and the double width type is illegal, then the two operands are sign extended to twice their size then multiplied to check for overflow. The extended upper halves were mismatched causing an incorrect result. This fixes the mismatch. A test was added for ARM V6-M where the bug was detected. Patch by James Duley. Differential Revision: https://reviews.llvm.org/D31807 llvm-svn: 301404
OpenPOWER on IntegriCloud