diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-03 11:32:00 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-03 11:32:00 +0000 |
| commit | 42d2b604b5ce332cedcf77d51353cc2493ee18c6 (patch) | |
| tree | 3acc58a5dc7296a8cc6af4978ef506c0334aa377 | |
| parent | bfd00a64404e148ae3255e994f90fe14be8df49d (diff) | |
| download | bcm5719-llvm-42d2b604b5ce332cedcf77d51353cc2493ee18c6.tar.gz bcm5719-llvm-42d2b604b5ce332cedcf77d51353cc2493ee18c6.zip | |
[SelectionDAG] Use INT_MIN as (1 << 31) is UB for signed integers. NFCI.
llvm-svn: 359873
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index f3099e3e18f..7b31f5d11e2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -9056,7 +9056,7 @@ unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const { // If this is a direct reference to a stack slot, use information about the // stack slot's alignment. - int FrameIdx = 1 << 31; + int FrameIdx = INT_MIN; int64_t FrameOffset = 0; if (FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Ptr)) { FrameIdx = FI->getIndex(); @@ -9067,7 +9067,7 @@ unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const { FrameOffset = Ptr.getConstantOperandVal(1); } - if (FrameIdx != (1 << 31)) { + if (FrameIdx != INT_MIN) { const MachineFrameInfo &MFI = getMachineFunction().getFrameInfo(); unsigned FIInfoAlign = MinAlign(MFI.getObjectAlignment(FrameIdx), FrameOffset); |

