[SelectionDAG] Fix shift libcall ABI mismatch in shift-amount argument
The shift libcalls have a shift amount parameter of MVT::i32, but sometimes ExpandIntRes_Shift may be called with a node whose second operand is a type that is larger than that. This leads to an ABI mismatch, and for example causes a spurious zeroing of a register in RV32 for 64-bit shifts. Note that at present regular shift intstructions already have their shift amount operand adapted at SelectionDAGBuilder::visitShift time, and funnelled shifts bypass that. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D110508
Loading
Please register or sign in to comment