[x86] avoid false dependency stall on 'sbb' with same source reg
authorSanjay Patel <spatel@rotateright.com>
Mon, 7 Feb 2022 15:12:12 +0000 (10:12 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 7 Feb 2022 15:12:12 +0000 (10:12 -0500)
commit40a50f8701a99a063a9950fc0a41f46934e4e160
treed897b4b68951f4a37ec156e2c8cedd513ee157a9
parent3c33b20eaaef296a1da4044fc6add0c5e3ccae55
[x86] avoid false dependency stall on 'sbb' with same source reg

This is effectively inverting the transform added with D116804
because the downside of the false dependency of something like
"sbb %eax, %eax" is much greater than the upside of eliminating
a zeroing instruction on (all?) Intel CPUs.

Differential Revision: https://reviews.llvm.org/D118843
20 files changed:
llvm/lib/Target/X86/X86.td
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86Subtarget.h
llvm/test/CodeGen/X86/combine-movmsk-avx.ll
llvm/test/CodeGen/X86/copy-eflags.ll
llvm/test/CodeGen/X86/jump_sign.ll
llvm/test/CodeGen/X86/machine-cse.ll
llvm/test/CodeGen/X86/pr32588.ll
llvm/test/CodeGen/X86/pr35972.ll
llvm/test/CodeGen/X86/sbb-false-dep.ll
llvm/test/CodeGen/X86/sbb-zero-idiom.ll
llvm/test/CodeGen/X86/sbb.ll
llvm/test/CodeGen/X86/sdiv_fix_sat.ll
llvm/test/CodeGen/X86/select.ll
llvm/test/CodeGen/X86/sext-i1.ll
llvm/test/CodeGen/X86/shl-crash-on-legalize.ll
llvm/test/CodeGen/X86/umul_fix_sat.ll
llvm/test/CodeGen/X86/vec_uaddo.ll
llvm/test/CodeGen/X86/vec_usubo.ll
llvm/test/CodeGen/X86/vector-compare-any_of.ll