Fix invalid cast in instcombine UMul/ZExt idiom
authorSerge Guelton <sguelton@quarkslab.com>
Mon, 10 Jul 2017 16:51:40 +0000 (16:51 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Mon, 10 Jul 2017 16:51:40 +0000 (16:51 +0000)
commitf6329ec2e9b695263ec665bb2a482169c6f89d96
treeb9e8127f7e87435148be9c539e82baebc7f7d9d0
parent168d14b143d04466984db81d50e6e5db8cb5d5bd
Fix invalid cast in instcombine UMul/ZExt idiom

Fixes https://bugs.llvm.org/show_bug.cgi?id=25454

Do not assume IRBuilder creates Instruction where it can create Value.
Do not assume idiom operands are constant, leave generalisation ot the IRBuilder.

Differential Revision: https://reviews.llvm.org/D35114

llvm-svn: 307554
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/2017-07-07-UMul-ZExt.ll [new file with mode: 0644]