[PATCH] D74482: [KnownBits] Introduce anyext instead of passing a flag into zext

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 05:45:55 PST 2020


foad created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
foad added reviewers: craig.topper, RKSimon, bjope.

This was a very odd API, where you had to pass a flag into a zext
function to say whether the extended bits really were zero or not. All
callers passed in a literal true or false.

I think it's much clearer to make the function name reflect the
operation being performed on the value we're tracking (rather than on
the KnownBits Zero and One fields), so zext means the value is being
zero extended and new function anyext means the value is being extended
with unknown bits.

NFC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74482

Files:
  llvm/include/llvm/Support/KnownBits.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
  llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74482.244147.patch
Type: text/x-patch
Size: 12817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/d112e864/attachment.bin>


More information about the llvm-commits mailing list