[llvm] [AMDGPU][SCEV] Tighten max backedge-taken count for shift recurrence … (PR #197292)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 17:20:05 PDT 2026


================
@@ -9687,6 +9688,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeShiftCompareExitLimit(
     else
       return false;
 
+    OutShiftAmt = ShiftAmt->getZExtValue();
----------------
efriedma-quic wrote:

`ShiftAmt->getZExtValue()` will assert if the shift amount doesn't fit into a uint64_t.

Probably we should check that the shift amount is less than the bit width.

https://github.com/llvm/llvm-project/pull/197292


More information about the llvm-commits mailing list