[PATCH] D22696: [CodeGenPrep] Skip merging empty case blocks

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:45:46 PDT 2016


junbuml created this revision.
junbuml added reviewers: rengolin, t.p.northover, mcrosier.
junbuml added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

Merging an empty case block into the header block of switch could cause ISel to add COPY instructions in the header of switch, instead of the case if the case block is used as an incoming block of a PH This could potentially increase dynamic instructions, especially when the switch is in a loop. I added a test case which was reduced from the benchmark I was targetting.

https://reviews.llvm.org/D22696

Files:
  lib/CodeGen/CodeGenPrepare.cpp
  test/CodeGen/AArch64/aarch64-skip-merging-case-block.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22696.65136.patch
Type: text/x-patch
Size: 9820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/2da669bb/attachment-0001.bin>


More information about the llvm-commits mailing list