[PATCH] D69863: [AMDGPU] Removed dead code from R600ISelLowering.cpp
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:34:20 PST 2019
rampitec created this revision.
rampitec added a reviewer: arsenm.
Herald added subscribers: hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.
This was added to inhibit a warning from gcc 7.3 according to
the comment. However, it triggers warning from PVS. In addition
I cannot reproduce it with gcc 7.4 and I also cannot reproduce
it with gcc 7.3 using compiler explorer.
https://reviews.llvm.org/D69863
Files:
llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
Index: llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
@@ -1715,12 +1715,7 @@
if (NewBldVec[i].isUndef())
continue;
- // Fix spurious warning with gcc 7.3 -O3
- // warning: array subscript is above array bounds [-Warray-bounds]
- // if (NewBldVec[i] == NewBldVec[j]) {
- // ~~~~~~~~~~~^
- if (i >= 4)
- continue;
+
for (unsigned j = 0; j < i; j++) {
if (NewBldVec[i] == NewBldVec[j]) {
NewBldVec[i] = DAG.getUNDEF(NewBldVec[i].getValueType());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69863.227932.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191105/a04bd9d5/attachment.bin>
More information about the llvm-commits
mailing list