[PATCH] D86270: [AMDGPU] Use tablegen for argument indices

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 00:00:59 PDT 2020


uabelho added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:3945
+          ((Intr->NumGradients / 2) % 2 == 1 &&
+           (I == Intr->GradientStart + (Intr->NumGradients / 2) - 1 ||
+            I == Intr->GradientStart + Intr->NumGradients - 1)) ||
----------------
Hi!
gcc warns on this and the next line about signed/unsigned comparisons:

```
../lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:3945:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            (I == Intr->GradientStart + (Intr->NumGradients / 2) - 1 ||
             ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:3946:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             I == Intr->GradientStart + Intr->NumGradients - 1)) ||
             ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
I suppose it's because I changed from signed to unsigned.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86270/new/

https://reviews.llvm.org/D86270



More information about the llvm-commits mailing list