[PATCH] D118843: [x86] avoid false dependency stall on 'sbb' with same source reg

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 13:08:57 PST 2022


spatel created this revision.
spatel added reviewers: craig.topper, pengfei, apostolakis, RKSimon.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is effectively inverting the transform added with D116804 <https://reviews.llvm.org/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.

I modeled the tuning flag on similar existing false dependency flags, but we could invert the logic and make this a positive flag for AMD instead. That would require less changes and not affect the default CPU models.


https://reviews.llvm.org/D118843

Files:
  llvm/lib/Target/X86/X86.td
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  llvm/lib/Target/X86/X86Subtarget.h
  llvm/test/CodeGen/X86/pr32588.ll
  llvm/test/CodeGen/X86/sbb-false-dep.ll
  llvm/test/CodeGen/X86/select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118843.405403.patch
Type: text/x-patch
Size: 16211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220202/e1428b32/attachment.bin>


More information about the llvm-commits mailing list