llvm.org GIT mirror llvm / c9e3d6e
[SelectionDAG] Use INT_MIN as (1 << 31) is UB for signed integers. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359873 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 4 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
90559055
90569056 // If this is a direct reference to a stack slot, use information about the
90579057 // stack slot's alignment.
9058 int FrameIdx = 1 << 31;
9058 int FrameIdx = INT_MIN;
90599059 int64_t FrameOffset = 0;
90609060 if (FrameIndexSDNode *FI = dyn_cast(Ptr)) {
90619061 FrameIdx = FI->getIndex();
90669066 FrameOffset = Ptr.getConstantOperandVal(1);
90679067 }
90689068
9069 if (FrameIdx != (1 << 31)) {
9069 if (FrameIdx != INT_MIN) {
90709070 const MachineFrameInfo &MFI = getMachineFunction().getFrameInfo();
90719071 unsigned FIInfoAlign = MinAlign(MFI.getObjectAlignment(FrameIdx),
90729072 FrameOffset);