[PATCH] D116469: [AMDGPU][KnownBits] Correct the known bits calculation for MUL_I24.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 1 01:24:52 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/include/llvm/Support/KnownBits.h:252-253
       return countMinLeadingOnes();
-    return 0;
+    // Every value has at least 1 sign bit.
+    return 1;
   }
----------------
This is certainly a right change.
Is there no exhaustive test for this function?
If not, could you add one? Else, adjust it to check that the returned value is u>=1 ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116469



More information about the llvm-commits mailing list