Revert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 19 Dec 2014 14:36:24 +0000 (14:36 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 19 Dec 2014 14:36:24 +0000 (14:36 +0000)
commit01b07d541bc953c2cf9e2b35523b6941e0bb7981
tree04334778b99ba5d42cb63dd9f34a129d7150b0bd
parentcba407d019a696d73e731f8e30c660bce1f9df12
Revert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"

Reverts commit r224574 to appease buildbots:

The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. This fixes an assertion crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224576 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/narrow-switch.ll