This is an archive of the discontinued LLVM Phabricator instance.

[TruncInstCombine] Remove scalable vector restriction
ClosedPublic

Authored by junparser on Dec 8 2020, 12:19 AM.

Details

Summary

This simple patch removes the restriction of scalable vector type in truncinstcombine.

TestPlan: check-llvm

Diff Detail

Event Timeline

junparser created this revision.Dec 8 2020, 12:19 AM
junparser requested review of this revision.Dec 8 2020, 12:19 AM

kindly ping~

sdesmalen accepted this revision.Dec 10 2020, 12:16 AM

LGTM

llvm/test/Transforms/AggressiveInstCombine/trunc_const_expr.ll
120

nit: instead of calling some @use32_scale_vec, could it simply be returned?

This revision is now accepted and ready to land.Dec 10 2020, 12:16 AM
junparser added inline comments.Dec 10 2020, 1:09 AM
llvm/test/Transforms/AggressiveInstCombine/trunc_const_expr.ll
120

Yes, we can. However, I prefer to keep the call in case when we can represent more vscale constant vector.

This revision was landed with ongoing or failed builds.Dec 10 2020, 2:00 AM
This revision was automatically updated to reflect the committed changes.