SelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()
authorTom Stellard <thomas.stellard@amd.com>
Mon, 26 Aug 2013 15:06:10 +0000 (15:06 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 26 Aug 2013 15:06:10 +0000 (15:06 +0000)
commitedd08f74289c6ba3b3f8e730e4ab825ef9bd6492
treecf3037b11ce6827bd2a1c3398d9e4c6b8b12b5a7
parentd08a9303614355cfdcac5f2c27c09ce809565423
SelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()

If we have a binary operation like ISD:ADD, we can set the result type
equal to the result type of one of its operands rather than using
TargetLowering::getPointerTy().

Also, any use of DAG.getIntPtrConstant(C) as an operand for a binary
operation can be replaced with:
DAG.getConstant(C, OtherOperand.getValueType());

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189227 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/R600/load.ll