[llvm] f2e7679 - [AMDGPU] Removed dead code from R600ISelLowering.cpp
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 12:03:02 PST 2019
Author: Stanislav Mekhanoshin
Date: 2019-11-05T12:02:48-08:00
New Revision: f2e7679d0f0b21d08356a8eb7e3b346443f0db9d
URL: https://github.com/llvm/llvm-project/commit/f2e7679d0f0b21d08356a8eb7e3b346443f0db9d
DIFF: https://github.com/llvm/llvm-project/commit/f2e7679d0f0b21d08356a8eb7e3b346443f0db9d.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
index 659458b0b752..ae385a638ca2 100644
--- a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
@@ -1715,12 +1715,7 @@ static SDValue CompactSwizzlableVector(
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());
More information about the llvm-commits
mailing list