|
18 | 18 | #include "AMDGPUMachineFunction.h" |
19 | 19 | #include "AMDGPUMemoryUtils.h" |
20 | 20 | #include "SIMachineFunctionInfo.h" |
21 | | -#include "SIRegisterInfo.h" |
22 | 21 | #include "llvm/CodeGen/Analysis.h" |
23 | 22 | #include "llvm/CodeGen/GlobalISel/GISelValueTracking.h" |
24 | 23 | #include "llvm/CodeGen/MachineFrameInfo.h" |
@@ -5287,27 +5286,6 @@ SDValue AMDGPUTargetLowering::performRcpCombine(SDNode *N, |
5287 | 5286 | return DCI.DAG.getConstantFP(One / Val, SDLoc(N), N->getValueType(0)); |
5288 | 5287 | } |
5289 | 5288 |
|
5290 | | -SDValue AMDGPUTargetLowering::expandABS(SDNode *N, SelectionDAG &CurDAG, |
5291 | | - bool IsNegative) const { |
5292 | | - assert(N->getOpcode() == ISD::ABS && |
5293 | | - "Tried to select abs with non-abs opcode."); |
5294 | | - |
5295 | | - if (N->getValueSizeInBits(0) != 16 || getRegClassFor(N->getSimpleValueType(0)) != &AMDGPU::SReg_32RegClass) |
5296 | | - return TargetLowering::expandABS(N, CurDAG, IsNegative); |
5297 | | - |
5298 | | - SDValue Src = N->getOperand(0); |
5299 | | - SDLoc DL(Src); |
5300 | | - |
5301 | | - SDValue SExtSrc = CurDAG.getSExtOrTrunc(Src, DL, MVT::i32); |
5302 | | - SDValue ExtAbs = CurDAG.getNode(ISD::ABS, DL, MVT::i32, SExtSrc); |
5303 | | - SDValue TruncResult = CurDAG.getNode(ISD::TRUNCATE, DL, MVT::i16, ExtAbs); |
5304 | | - |
5305 | | - if (!IsNegative) |
5306 | | - return TruncResult; |
5307 | | - return CurDAG.getNode(ISD::SUB, DL, MVT::i16, |
5308 | | - CurDAG.getConstant(0, DL, MVT::i16), TruncResult); |
5309 | | -} |
5310 | | - |
5311 | 5289 | SDValue AMDGPUTargetLowering::PerformDAGCombine(SDNode *N, |
5312 | 5290 | DAGCombinerInfo &DCI) const { |
5313 | 5291 | SelectionDAG &DAG = DCI.DAG; |
|
0 commit comments