[all-commits] [llvm/llvm-project] f4bbca: [Clang] Allow the value of unroll count to be zero...

yronglin via All-commits all-commits at lists.llvm.org
Thu Apr 18 20:52:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f4bbcac244eded55acf02cc9fd74eb3f0b075304
      https://github.com/llvm/llvm-project/commit/f4bbcac244eded55acf02cc9fd74eb3f0b075304
  Author: yronglin <yronglin777 at gmail.com>
  Date:   2024-04-19 (Fri, 19 Apr 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/CodeGen/CGLoopInfo.cpp
    M clang/lib/Parse/ParsePragma.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaStmtAttr.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/CodeGenCXX/pragma-gcc-unroll.cpp
    M clang/test/Parser/pragma-unroll.cpp

  Log Message:
  -----------
  [Clang] Allow the value of unroll count to be zero  in `#pragma GCC unroll` and `#pragma unroll` (#88666)

Fixes https://github.com/llvm/llvm-project/issues/88624

GCC allows the value of loop unroll count to be zero, and the values of
0 and 1 block any unrolling of the loop. This PR aims to make clang
keeps the same behavior with GCC.
https://gcc.gnu.org/onlinedocs/gcc/Loop-Specific-Pragmas.html

---------

Signed-off-by: yronglin <yronglin777 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list