[PATCH] D73695: AMDGPU: Replace subtarget check with an assert
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 05:08:29 PST 2020
arsenm created this revision.
arsenm added reviewers: rampitec, nhaehnle, kerbowa.
Herald added subscribers: hiraditya, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.
This is already checked by the pattern subtarget predicate.
https://reviews.llvm.org/D73695
Files:
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -1852,8 +1852,7 @@
bool AMDGPUDAGToDAGISel::SelectSMRDImm32(SDValue Addr, SDValue &SBase,
SDValue &Offset) const {
- if (Subtarget->getGeneration() != AMDGPUSubtarget::SEA_ISLANDS)
- return false;
+ assert(Subtarget->getGeneration() == AMDGPUSubtarget::SEA_ISLANDS);
bool Imm;
if (!SelectSMRD(Addr, SBase, Offset, Imm))
@@ -1877,8 +1876,7 @@
bool AMDGPUDAGToDAGISel::SelectSMRDBufferImm32(SDValue Addr,
SDValue &Offset) const {
- if (Subtarget->getGeneration() != AMDGPUSubtarget::SEA_ISLANDS)
- return false;
+ assert(Subtarget->getGeneration() == AMDGPUSubtarget::SEA_ISLANDS);
bool Imm;
if (!SelectSMRDOffset(Addr, Offset, Imm))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73695.241418.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/8be992b9/attachment.bin>
More information about the llvm-commits
mailing list