[llvm] r276946 - AMDGPU: Turn dead checks into asserts
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 17:32:05 PDT 2016
Author: arsenm
Date: Wed Jul 27 19:32:05 2016
New Revision: 276946
URL: http://llvm.org/viewvc/llvm-project?rev=276946&view=rev
Log:
AMDGPU: Turn dead checks into asserts
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp?rev=276946&r1=276945&r2=276946&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Wed Jul 27 19:32:05 2016
@@ -1872,13 +1872,12 @@ SDValue AMDGPUTargetLowering::LowerUINT_
"operation should be legal");
EVT DestVT = Op.getValueType();
- if (DestVT == MVT::f64)
- return LowerINT_TO_FP64(Op, DAG, false);
if (DestVT == MVT::f32)
return LowerINT_TO_FP32(Op, DAG, false);
- return SDValue();
+ assert(DestVT == MVT::f64);
+ return LowerINT_TO_FP64(Op, DAG, false);
}
SDValue AMDGPUTargetLowering::LowerSINT_TO_FP(SDValue Op,
@@ -1890,10 +1889,8 @@ SDValue AMDGPUTargetLowering::LowerSINT_
if (DestVT == MVT::f32)
return LowerINT_TO_FP32(Op, DAG, true);
- if (DestVT == MVT::f64)
- return LowerINT_TO_FP64(Op, DAG, true);
-
- return SDValue();
+ assert(DestVT == MVT::f64);
+ return LowerINT_TO_FP64(Op, DAG, true);
}
SDValue AMDGPUTargetLowering::LowerFP64_TO_INT(SDValue Op, SelectionDAG &DAG,
@@ -1951,8 +1948,7 @@ SDValue AMDGPUTargetLowering::LowerSIGN_
MVT VT = Op.getSimpleValueType();
MVT ScalarVT = VT.getScalarType();
- if (!VT.isVector())
- return SDValue();
+ assert(VT.isVector());
SDValue Src = Op.getOperand(0);
SDLoc DL(Op);
More information about the llvm-commits
mailing list