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)
commit38537634e2b24674c291c1d691b13864a1fbae25
tree49371555960218195d9aae8918c79bd2ae45a5b2
parent7440a83e600f12c0fd0bd265381a5cd89a0718ac
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219832 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/narrow-switch.ll [new file with mode: 0644]