Index: include/llvm/Target/GenericOpcodes.td =================================================================== --- include/llvm/Target/GenericOpcodes.td +++ include/llvm/Target/GenericOpcodes.td @@ -213,21 +213,21 @@ // Generic left-shift. def G_SHL : GenericInstruction { let OutOperandList = (outs type0:$dst); - let InOperandList = (ins type0:$src1, type0:$src2); + let InOperandList = (ins type0:$src1, type1:$src2); let hasSideEffects = 0; } // Generic logical right-shift. def G_LSHR : GenericInstruction { let OutOperandList = (outs type0:$dst); - let InOperandList = (ins type0:$src1, type0:$src2); + let InOperandList = (ins type0:$src1, type1:$src2); let hasSideEffects = 0; } // Generic arithmetic right-shift. def G_ASHR : GenericInstruction { let OutOperandList = (outs type0:$dst); - let InOperandList = (ins type0:$src1, type0:$src2); + let InOperandList = (ins type0:$src1, type1:$src2); let hasSideEffects = 0; } Index: lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp +++ lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp @@ -134,6 +134,7 @@ setAction({G_SELECT, 1, S1}, Legal); setAction({G_SHL, S32}, Legal); + setAction({G_SHL, 1, S32}, Legal); // FIXME: When RegBankSelect inserts copies, it will only create new