[X86] Fix checked arithmetic for i8 on X86.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 2 Jun 2014 16:00:27 +0000 (16:00 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 2 Jun 2014 16:00:27 +0000 (16:00 +0000)
commit0bedfa456a7421940818224bcd0b61245c5c5568
treea91f99472c873bac95dac4ceb4218d3c21377236
parentd958619a2dbc7422fcd342849a898790a0bb082b
[X86] Fix checked arithmetic for i8 on X86.

When lowering a ISD::BRCOND into a test+branch, make sure that we
always use the correct condition code to emit the test operation.

This fixes PR19858: "i8 checked mul is wrong on x86".

Patch by Keno Fisher!

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