Skip to content

Commit 7a10c5e

Browse files
committed
Revert to master
1 parent 8469079 commit 7a10c5e

File tree

5 files changed

+2
-28
lines changed

5 files changed

+2
-28
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5580,8 +5580,8 @@ class LLVM_ABI TargetLowering : public TargetLoweringBase {
55805580
/// \param N Node to expand
55815581
/// \param IsNegative indicate negated abs
55825582
/// \returns The expansion result or SDValue() if it fails.
5583-
virtual SDValue expandABS(SDNode *N, SelectionDAG &DAG,
5584-
bool IsNegative = false) const;
5583+
SDValue expandABS(SDNode *N, SelectionDAG &DAG,
5584+
bool IsNegative = false) const;
55855585

55865586
/// Expand ABDS/ABDU nodes. Expands vector/scalar ABDS/ABDU nodes.
55875587
/// \param N Node to expand

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "SIMachineFunctionInfo.h"
2424
#include "llvm/Analysis/UniformityAnalysis.h"
2525
#include "llvm/CodeGen/FunctionLoweringInfo.h"
26-
#include "llvm/CodeGen/ISDOpcodes.h"
2726
#include "llvm/CodeGen/SelectionDAG.h"
2827
#include "llvm/CodeGen/SelectionDAGISel.h"
2928
#include "llvm/CodeGen/SelectionDAGNodes.h"

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ class AMDGPUDAGToDAGISel : public SelectionDAGISel {
282282
void SelectADD_SUB_I64(SDNode *N);
283283
void SelectAddcSubb(SDNode *N);
284284
void SelectUADDO_USUBO(SDNode *N);
285-
bool SelectABS(SDNode *N);
286285
void SelectDIV_SCALE(SDNode *N);
287286
void SelectMAD_64_32(SDNode *N);
288287
void SelectMUL_LOHI(SDNode *N);

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "AMDGPUMachineFunction.h"
1919
#include "AMDGPUMemoryUtils.h"
2020
#include "SIMachineFunctionInfo.h"
21-
#include "SIRegisterInfo.h"
2221
#include "llvm/CodeGen/Analysis.h"
2322
#include "llvm/CodeGen/GlobalISel/GISelValueTracking.h"
2423
#include "llvm/CodeGen/MachineFrameInfo.h"
@@ -5287,27 +5286,6 @@ SDValue AMDGPUTargetLowering::performRcpCombine(SDNode *N,
52875286
return DCI.DAG.getConstantFP(One / Val, SDLoc(N), N->getValueType(0));
52885287
}
52895288

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-
53115289
SDValue AMDGPUTargetLowering::PerformDAGCombine(SDNode *N,
53125290
DAGCombinerInfo &DCI) const {
53135291
SelectionDAG &DAG = DCI.DAG;

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ class AMDGPUTargetLowering : public TargetLowering {
135135
SDValue performFNegCombine(SDNode *N, DAGCombinerInfo &DCI) const;
136136
SDValue performFAbsCombine(SDNode *N, DAGCombinerInfo &DCI) const;
137137
SDValue performRcpCombine(SDNode *N, DAGCombinerInfo &DCI) const;
138-
virtual SDValue expandABS(SDNode *N, SelectionDAG &CurDAG,
139-
bool IsNegative) const override;
140138

141139
static EVT getEquivalentMemType(LLVMContext &Context, EVT VT);
142140

0 commit comments

Comments
 (0)