Add an assertion to the form of SelectionDAG::getConstant that takes
authorDan Gohman <gohman@apple.com>
Tue, 27 Jan 2009 20:39:34 +0000 (20:39 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 27 Jan 2009 20:39:34 +0000 (20:39 +0000)
commitce9bc12c6f3c3544f7518c0c60203f2f9dff342f
treea60dd3cbe68329a1fa1e55da165597ddfeecc67c
parentd3f184906d341924fbebe9b09e225c624b4e0474
Add an assertion to the form of SelectionDAG::getConstant that takes
a uint64_t to verify that the value is in range for the given type,
to help catch accidental overflow. Fix a few places that relied on
getConstant implicitly truncating the value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63128 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/ValueTypes.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp