Instcombine should not promote whole computation trees to "strange"
authorChris Lattner <sabre@nondot.org>
Wed, 8 Apr 2009 05:41:03 +0000 (05:41 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 8 Apr 2009 05:41:03 +0000 (05:41 +0000)
commitddfa57bd7be5341f78481521c223bd7df5c3337a
tree4164eb299173dd9429f161e0733392e262528149
parent7836fc129ab5f212ee2cd5b3c232d93751f3e853
Instcombine should not promote whole computation trees to "strange"
integer types, unless they are already strange.  This prevents it from
turning the code produced by SROA into crazy libcalls and stuff that
the code generator can't handle.  In the attached example, the result
was an i96 multiply that caused the x86 backend to assert.

Note that if TargetData had an idea of what the legal types are for
a target that this could be used to stop instcombine from introducing
i64 muls, as Scott wanted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68598 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2009-04-07-MulPromoteToI96.ll [new file with mode: 0644]