[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)
commit2b09d17d93d8a3cdc98747a4d2d4d6be5840087f
tree7cda436a739edda55eda33a790ea46f68e4e5d5e
parent7e1ea993e0d3668dbbbf1097ead7b9e190aec23f
[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.

llvm-svn: 348727
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86IntrinsicsInfo.h
llvm/test/CodeGen/X86/adx-intrinsics-upgrade.ll
llvm/test/CodeGen/X86/adx-intrinsics.ll