From: Aditya Nandakumar Date: Thu, 26 Oct 2017 20:13:54 +0000 (+0000) Subject: [GISel]: Missed checking if it's okay to create a G_CONSTANT of DstTy in the legaliza... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b9f2f63454239c89cde6ff4ded6bc576434b83c;p=llvm [GISel]: Missed checking if it's okay to create a G_CONSTANT of DstTy in the legalizationCombiner git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h b/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h index c22b31302e5..2d2a3e01d21 100644 --- a/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h +++ b/include/llvm/CodeGen/GlobalISel/LegalizerCombiner.h @@ -88,7 +88,8 @@ public: unsigned DstReg = MI.getOperand(0).getReg(); LLT DstTy = MRI.getType(DstReg); if (isInstUnsupported(TargetOpcode::G_SHL, DstTy) || - isInstUnsupported(TargetOpcode::G_ASHR, DstTy)) + isInstUnsupported(TargetOpcode::G_ASHR, DstTy) || + isInstUnsupported(TargetOpcode::G_CONSTANT, DstTy)) return false; DEBUG(dbgs() << ".. Combine MI: " << MI;); Builder.setInstr(MI);