[PATCH] D89214: [X86] Add basic computeKnownBits support for X86ISD::BSR

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 14:27:32 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added subscribers: javed.absar, hiraditya.
Herald added a project: LLVM.
craig.topper requested review of this revision.

The behavior is undefined for an input of 0, otherwise the result
is the position of the most significant set bit which must be in
the range [0, bitwidth-1]. So any bits above log2 of bitwidth
must be 0.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89214

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/clz.ll
  llvm/test/CodeGen/X86/pr40090.ll
  llvm/test/CodeGen/X86/scheduler-backtracking.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89214.297490.patch
Type: text/x-patch
Size: 8015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201011/45f44f10/attachment.bin>


More information about the llvm-commits mailing list