[PATCH] D12249: Remove the final bit test during lowering switch statement if all cases in bit test cover a contiguous range.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 17:04:16 PDT 2015


congh updated this revision to Diff 32887.
congh added a comment.

Update the patch by disabling the optimization in this patch when the case value can fit in a word and the minimum value of the value range is not zero (in which case we can save a subtraction).


http://reviews.llvm.org/D12249

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  test/CodeGen/X86/switch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12249.32887.patch
Type: text/x-patch
Size: 6447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150822/c6bfd1cc/attachment.bin>


More information about the llvm-commits mailing list