summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2019-11-05 11:22:07 -0800
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2019-11-05 12:02:48 -0800
commitf2e7679d0f0b21d08356a8eb7e3b346443f0db9d (patch)
tree1c872c82bf7fae5941b3bdb897a6be548b761ae8
parent027aa27d95c165cb4afa2c0b43b22b729d989755 (diff)
downloadbcm5719-llvm-f2e7679d0f0b21d08356a8eb7e3b346443f0db9d.tar.gz
bcm5719-llvm-f2e7679d0f0b21d08356a8eb7e3b346443f0db9d.zip
[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
-rw-r--r--llvm/lib/Target/AMDGPU/R600ISelLowering.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
index 659458b0b75..ae385a638ca 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());
OpenPOWER on IntegriCloud