This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Support (mul (sext x), cst) --> (sext (mul x, cst')) and (mul (zext x), cst) --> (zext (mul x, cst')) for vectors constants.
ClosedPublic

Authored by craig.topper on Sep 10 2018, 5:02 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Sep 10 2018, 5:02 PM
spatel accepted this revision.Sep 11 2018, 6:31 AM

LGTM

This revision is now accepted and ready to land.Sep 11 2018, 6:31 AM
spatel added inline comments.Sep 11 2018, 6:35 AM
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
328–332 ↗(On Diff #164775)

Nit: here and below, it would probably be easier to read and shorter using 'match' rather than dyn_cast.

This revision was automatically updated to reflect the committed changes.