InstCombine: Narrow switch instructions using known bits.
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 15 Oct 2014 19:05:50 +0000 (19:05 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 15 Oct 2014 19:05:50 +0000 (19:05 +0000)
commit5bb9346a45573a10421e376808c0d3b59a3b0ab5
treeab7f5f165a73b228fcc2f8aaddef35291bea3a10
parentf82c987a5cc1ecce7b5e3e11fff974e278e89c81
InstCombine: Narrow switch instructions using known bits.

Truncate the operands of a switch instruction to a narrower type if the upper
bits are known to be all ones or zeros.

rdar://problem/17720004

llvm-svn: 219832
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/narrow-switch.ll [new file with mode: 0644]