[PATCH] D39262: [CodeGen] Peel off the dominant case in switch statement in lowering

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 10:03:26 PST 2017


xur updated this revision to Diff 121924.
xur added a comment.

Added more switch cases to make the lowering generate binary search compares. 
Thanks to Hans's suggestion.

I also moved the test case to from test/CodeGenGeneric/ test/CodeGen/X86/ as it now checks the IR for x86.


https://reviews.llvm.org/D39262

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  test/CodeGen/Generic/MachineBranchProb.ll
  test/CodeGen/SystemZ/loop-03.ll
  test/CodeGen/X86/switch-bt.ll
  test/CodeGen/X86/switch-lower-peel-top-case.ll
  test/CodeGen/X86/switch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39262.121924.patch
Type: text/x-patch
Size: 14922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171107/f292b963/attachment.bin>


More information about the llvm-commits mailing list