This is an archive of the discontinued LLVM Phabricator instance.

Fix invalid cast in instcombine UMul/ZExt idiom
ClosedPublic

Authored by serge-sans-paille on Jul 7 2017, 3:05 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sepavloff accepted this revision.Jul 10 2017, 3:47 AM

LGTM with small remark.

lib/Transforms/InstCombine/InstCombineCompares.cpp
3849

Explicit type instead of auto would improve readability.

This revision is now accepted and ready to land.Jul 10 2017, 3:47 AM
This revision was automatically updated to reflect the committed changes.
serge-sans-paille marked an inline comment as done.Jul 10 2017, 9:52 AM

@sepavloff commited, thanks