[PATCH] D29088: Do not create ctlz/cttz(X, false) when the target do not support zero defined ctlz/cttz.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 09:58:45 PST 2017


deadalnix created this revision.

The branch/select is removed in InstCombine and then recreated in CodegenPrepare, effectively making it invisible to most of the optimization pipeline, which lead to bad optimizations of cttz/ctlz when the target doesn't have a zero defined version of them.


https://reviews.llvm.org/D29088

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/X86/X86TargetTransformInfo.cpp
  lib/Target/X86/X86TargetTransformInfo.h
  lib/Transforms/InstCombine/InstCombineInternal.h
  lib/Transforms/InstCombine/InstCombineSelect.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
  test/Transforms/InstCombine/select-cmp-cttz-ctlz.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29088.85602.patch
Type: text/x-patch
Size: 28679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/9f5b51a2/attachment.bin>


More information about the llvm-commits mailing list