Recommit "[X86] Use X86ISD::SUB instead of X86ISD::CMP in some places."
authorCraig Topper <craig.topper@intel.com>
Tue, 4 Feb 2020 19:25:24 +0000 (11:25 -0800)
committerCraig Topper <craig.topper@intel.com>
Tue, 4 Feb 2020 20:19:34 +0000 (12:19 -0800)
commite195ff98f6cc2f868d5f8c19d2ab93cfb3a2cb65
treeb4b1b1c3db0faf7d96e9a141fde0d28c7d062f54
parentf0fb09c33e390db16e47cc03a01d0e6f4578e0a7
Recommit "[X86] Use X86ISD::SUB instead of X86ISD::CMP in some places."

This time with correct types for the data result from the SUB.

Original commit message:

Our normal lowering for ISD::SETCC uses X86ISD::SUB to enable
CSE unless the RHS is 0. optimizeCompareInstr called by the peephole
pass can turn subs with unused results into cmps to clean this up.

This commit makes other places that create X86ISD::CMP have the
same behavior.
llvm/lib/Target/X86/X86ISelLowering.cpp