Skip to content

Commit f2e7679

Browse files
committed
[AMDGPU] Removed dead code from R600ISelLowering.cpp
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. Differential Revision: https://reviews.llvm.org/D69863
1 parent 027aa27 commit f2e7679

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Target/AMDGPU/R600ISelLowering.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,12 +1715,7 @@ static SDValue CompactSwizzlableVector(
17151715

17161716
if (NewBldVec[i].isUndef())
17171717
continue;
1718-
// Fix spurious warning with gcc 7.3 -O3
1719-
// warning: array subscript is above array bounds [-Warray-bounds]
1720-
// if (NewBldVec[i] == NewBldVec[j]) {
1721-
// ~~~~~~~~~~~^
1722-
if (i >= 4)
1723-
continue;
1718+
17241719
for (unsigned j = 0; j < i; j++) {
17251720
if (NewBldVec[i] == NewBldVec[j]) {
17261721
NewBldVec[i] = DAG.getUNDEF(NewBldVec[i].getValueType());

0 commit comments

Comments
 (0)