summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2018-06-22 02:54:57 +0000
committerTom Stellard <tstellar@redhat.com>2018-06-22 02:54:57 +0000
commit26fac0f8e11c10caae3bbf731cfa3ad74fc9d826 (patch)
treed2fbae5eab0a1e37a764cad607824edc2863350a /llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
parentfe70b29cf71283eaa9cc104eeddcc011befcec73 (diff)
downloadbcm5719-llvm-26fac0f8e11c10caae3bbf731cfa3ad74fc9d826.tar.gz
bcm5719-llvm-26fac0f8e11c10caae3bbf731cfa3ad74fc9d826.zip
AMDGPU/GlobalISel: legalize and select 32-bit G_ASHR
Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, rovka, kristof.beyls, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D48196 llvm-svn: 335318
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
index f98f57ea047..80a1bc9fe17 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
@@ -537,6 +537,7 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I,
switch (I.getOpcode()) {
default:
break;
+ case TargetOpcode::G_ASHR:
case TargetOpcode::G_SITOFP:
case TargetOpcode::G_FMUL:
case TargetOpcode::G_FADD:
@@ -564,6 +565,14 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I,
return false;
}
+InstructionSelector::ComplexRendererFns
+AMDGPUInstructionSelector::selectVCSRC(MachineOperand &Root) const {
+ return {{
+ [=](MachineInstrBuilder &MIB) { MIB.add(Root); }
+ }};
+
+}
+
///
/// This will select either an SGPR or VGPR operand and will save us from
/// having to write an extra tablegen pattern.
OpenPOWER on IntegriCloud