This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Remove calls to VectorType::getNumElements from InstCombine
ClosedPublic

Authored by ctetreau on Jun 19 2020, 2:24 PM.

Diff Detail

Event Timeline

ctetreau created this revision.Jun 19 2020, 2:24 PM
Herald added a project: Restricted Project. · View Herald Transcript
ctetreau updated this revision to Diff 273176.Jun 24 2020, 3:40 PM

catch stragglers

ctetreau updated this revision to Diff 282704.Aug 3 2020, 1:18 PM

rebase, catch stragglers

ctetreau added inline comments.Aug 27 2020, 2:04 PM
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
189–190

These changes are covered by test Transforms/InstCombine/vscale_extractelement.ll, and isn't really a behavior change since it Min is used in exactly the same way as the numElements was before. The Min is not used for iteration, so this should be safe.

2287

This behavioral change is covered by test Transforms/InstCombine/vscale_extractelement.ll.

ctetreau updated this revision to Diff 288668.Aug 28 2020, 12:11 PM

clang-format

Harbormaster completed remote builds in B69947: Diff 288668.

LGTM with one minor change.

llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
338

Change the initialization of InVTy? There's no reason to do the cast<> in two stages.

ctetreau updated this revision to Diff 289001.Aug 31 2020, 12:08 PM

address code review issues

efriedma accepted this revision.Aug 31 2020, 12:24 PM
This revision is now accepted and ready to land.Aug 31 2020, 12:24 PM