OSDN Git Service

[x86] Fix PR20355 (and dups) by not using unsigned multiplication when
authorChandler Carruth <chandlerc@gmail.com>
Sat, 26 Jul 2014 01:52:13 +0000 (01:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 26 Jul 2014 01:52:13 +0000 (01:52 +0000)
commit47a12d8d2c07a6271006b3337206badb29ba553e
tree518370d0686963f9bbcd610832cde29e0b74d0b3
parent72d05e0035a0ac40862ad3a8ce426686e5f276b0
[x86] Fix PR20355 (and dups) by not using unsigned multiplication when
signed multiplication is requested. While there is not a difference in
the *low* half of the result, the *high* half (used specifically to
implement the signed division by these constants) certainly is used. The
test case I've nuked was actively asserting wrong code.

There is a delightful solution to doing signed multiplication even when
we don't have it that Richard Smith has crafted, but I'll add the
machinery back and implement that in a follow-up patch. This at least
restores correctness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214007 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/vector-idiv.ll