This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Remove scalable vector restriction in foldVectorBinop
ClosedPublic

Authored by junparser on Dec 15 2020, 2:38 AM.

Diff Detail

Event Timeline

junparser created this revision.Dec 15 2020, 2:38 AM
junparser requested review of this revision.Dec 15 2020, 2:38 AM
RKSimon added inline comments.Dec 15 2020, 4:11 AM
llvm/test/Transforms/InstCombine/fold-bin-operand.ll
58

please can you run this through the update_test_checks.py script?

junparser updated this revision to Diff 311863.Dec 15 2020, 4:21 AM
junparser marked an inline comment as done.

address the comment, update the testcase.

RKSimon accepted this revision.Dec 15 2020, 4:53 AM

LGTM with one minor

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
1607–1608

Might be worth pulling out the repeated isa/cast on Inst.getType():

auto *InstVTy = dyn_cast<FixedVectorType>(Inst.getType());

This revision is now accepted and ready to land.Dec 15 2020, 4:53 AM

LGTM with one minor

Thanks for review. I'll update when I commit the patch.