OSDN Git Service

[X86] If the carry input to an addcarry/subborrow intrinsic is known to be 0, emit...
authorCraig Topper <craig.topper@intel.com>
Sun, 9 Dec 2018 18:02:37 +0000 (18:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 9 Dec 2018 18:02:37 +0000 (18:02 +0000)
commitb1f260ed6a66fcafb295676e0a37f26bdf01fa7c
treefa4f6c5b8fa2a9994f23b88c648cfacc6bf57c22
parenta34f510e3f6e720a8f35eace0765b5e7f774708d
[X86] If the carry input to an addcarry/subborrow intrinsic is known to be 0, emit a flag setting ADD/SUB instead of ADC/SBB.

Previously we had to take the carry in and add -1 to it to set the carry flag so we could use it with ADC/SBB. But if we know its 0 then we don't need to bother.

This should go a long way towards fixing PR24545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348727 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86IntrinsicsInfo.h
test/CodeGen/X86/adx-intrinsics-upgrade.ll
test/CodeGen/X86/adx-intrinsics.ll