diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-05-06 13:41:54 +0000 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-05-06 13:41:54 +0000 |
commit | 799d96ec395fc617fedea40676da32f532d1534b (patch) | |
tree | 42995b67535500b53409f46470efb20373feb4f7 /llvm/lib | |
parent | 70afe4f7e1f72607881d8ff4719149a0dbc94120 (diff) | |
download | bcm5719-llvm-799d96ec395fc617fedea40676da32f532d1534b.tar.gz bcm5719-llvm-799d96ec395fc617fedea40676da32f532d1534b.zip |
Fix compilation warnings when compiling with GCC 7.3
Differential Revision: https://reviews.llvm.org/D61046
llvm-svn: 360044
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AMDGPU/R600ISelLowering.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp index 9f7635dd867..4aa2778c614 100644 --- a/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp @@ -1714,6 +1714,12 @@ 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()); |