[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
Thu Feb 3 09:50:35 PST 2022


spatel updated this revision to Diff 405689.
spatel added a comment.

Patch updated:

1. Inverted polarity of the CPU attribute - default assumes we do not have the sbb idiom (we should zero the register).
2. Added a test file to check that the CPU attribute is on the right set of CPUs (Agner's guide says it is effectively any 64-bit AMD CPU).

We get more diffs than were created by D116804 <https://reviews.llvm.org/D116804> because this is adding a zero op to every SETCC_CARRY node rather than just the ones that were altered by the earlier patch.

There might be a way to reduce the diffs, but I haven't found the predicate yet. Safer to err on the side of executing an unnecessary zero op rather than missing a false dependency stall?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118843/new/

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/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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118843.405689.patch
Type: text/x-patch
Size: 71217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220203/6f9a9d7d/attachment.bin>


More information about the llvm-commits mailing list