[X86] Use CMOVNS for abs instead of CMOVGE.
authorCraig Topper <craig.topper@sifive.com>
Thu, 14 Oct 2021 18:23:42 +0000 (11:23 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 14 Oct 2021 19:28:28 +0000 (12:28 -0700)
commit3ff9cc01f2754a78c5c90a035dad97959946f5f3
tree999d127a1cc67e24723f8e0e74cce2aba6c9bc44
parent19db33c06e7e7b5991f8f4b22d3bd7651b1f854d
[X86] Use CMOVNS for abs instead of CMOVGE.

CMOVGE reads SF and OF. CMOVNS only reads SF. This matches with
other recent changes to use a single flag where possible. It also
matches gcc codegen.

I believe this technically changes whether the conditioanl move happens
on INT_MIN, but for INT_MIN both registers are the same so it doesn't
matter.

Differential Revision: https://reviews.llvm.org/D111826
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/abs.ll
llvm/test/CodeGen/X86/combine-abs.ll
llvm/test/CodeGen/X86/iabs.ll
llvm/test/CodeGen/X86/neg-abs.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/basic.ll.expected