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

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 01:16:17 PDT 2017


rovka accepted this revision.
rovka added a comment.
This revision is now accepted and ready to land.

LGTM with nit.



================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h:71
       auto SrcCopyOrTrunc = Builder.buildAnyExtOrTrunc(DstTy, TruncSrc);
       Builder.buildAnd(DstReg, SrcCopyOrTrunc, MaskCstMIB);
       markInstAndDefDead(MI, *DefMI, DeadInsts);
----------------
You should check the same thing for G_AND and G_CONSTANT.


https://reviews.llvm.org/D39264





More information about the llvm-commits mailing list