[all-commits] [llvm/llvm-project] 99ddd7: [LoopUnroll] Introduce PragmaUnrollFullMaxIteratio...

modiking via All-commits all-commits at lists.llvm.org
Mon Feb 5 17:01:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99ddd77ed9e12f55f8d4b66eec02154a0b3a6bf0
      https://github.com/llvm/llvm-project/commit/99ddd77ed9e12f55f8d4b66eec02154a0b3a6bf0
  Author: modiking <modiking213 at gmail.com>
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
    A llvm/test/Transforms/LoopUnroll/pr77842.ll

  Log Message:
  -----------
  [LoopUnroll] Introduce PragmaUnrollFullMaxIterations as a hard cap on how many iterations we try to unroll (#78648)

Fixes [PR77842](https://github.com/llvm/llvm-project/issues/77842) where
UBSAN causes pragma full unroll to try and unroll INT_MAX times. This
sets a cap to make sure we don't attempt this and crash the compiler.

Testing:
ninja check-all with new test

---------

Co-authored-by: Nikita Popov <github at npopov.com>




More information about the All-commits mailing list