This is an archive of the discontinued LLVM Phabricator instance.

[GISel]: Make the combiner check if shifts are legal before creating them
ClosedPublic

Authored by aditya_nandakumar on Oct 24 2017, 5:10 PM.

Details

Summary

Make sure shifts are legal/specified by the legalizerinfo before creating it (in the LegalizerCombiner)

Diff Detail

Repository
rL LLVM

Event Timeline

aditya_nandakumar retitled this revision from Make the combiner check if shifts are legal before creating them to [GISel]: Make the combiner check if shifts are legal before creating them.Oct 24 2017, 5:12 PM
aditya_nandakumar edited the summary of this revision. (Show Details)
rovka accepted this revision.Oct 25 2017, 1:16 AM

LGTM with nit.

include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h
71 ↗(On Diff #120153)

You should check the same thing for G_AND and G_CONSTANT.

This revision is now accepted and ready to land.Oct 25 2017, 1:16 AM
include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h
71 ↗(On Diff #120153)

Thanks. Will do it in the commit.

This revision was automatically updated to reflect the committed changes.
rovka added inline comments.Oct 26 2017, 2:58 AM
llvm/trunk/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h
98

You forgot this G_CONSTANT :)

llvm/trunk/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h
98

Fixed - r316694
Thanks