diff options
author | Shafik Yaghmour <shafik.yaghmour@intel.com> | 2025-08-08 10:04:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-08 10:04:34 -0700 |
commit | 51bc0c1d6bb9ab2c1c2acb3f37d00ed919202973 (patch) | |
tree | eaacaab36519aa00c8fdc27aa95ddc80c9f41a33 /llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp | |
parent | 8ad8876cea3604f218a717b65bf3fbd0c3037516 (diff) | |
download | llvm-51bc0c1d6bb9ab2c1c2acb3f37d00ed919202973.zip llvm-51bc0c1d6bb9ab2c1c2acb3f37d00ed919202973.tar.gz llvm-51bc0c1d6bb9ab2c1c2acb3f37d00ed919202973.tar.bz2 |
[HLSL][NFC] Fix range check in verifyRegisterSpace (#152615)
Static analysis flagged the second part of this range check as always
true. RegisterSpace is uint32_t therefore the max value is 0xFFFFFFFF
and so the first check is sufficient.
Diffstat (limited to 'llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp')
-rw-r--r-- | llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp b/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp index 9d84aa8..72308a3d 100644 --- a/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp +++ b/llvm/lib/Frontend/HLSL/RootSignatureValidations.cpp @@ -29,7 +29,7 @@ bool verifyRegisterValue(uint32_t RegisterValue) { // This Range is reserverved, therefore invalid, according to the spec // https://github.com/llvm/wg-hlsl/blob/main/proposals/0002-root-signature-in-clang.md#all-the-values-should-be-legal bool verifyRegisterSpace(uint32_t RegisterSpace) { - return !(RegisterSpace >= 0xFFFFFFF0 && RegisterSpace <= 0xFFFFFFFF); + return !(RegisterSpace >= 0xFFFFFFF0); } bool verifyRootDescriptorFlag(uint32_t Version, uint32_t FlagsVal) { |