[clang] [Clang] Support `-falign-loops=N` for LTO (PR #181702)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 09:39:35 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 52552 tests passed
* 959 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.Driver/falign-loops.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=0 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_NO
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=0 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_NO
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=1 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=1 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_1
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=4 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_4
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=4 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_4
# note: command had no output on stdout or stderr
# RUN: at line 6
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=5 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_5
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=5 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_5
# note: command had no output on stdout or stderr
# RUN: at line 7
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=65536 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_65536
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=65536 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_65536
# note: command had no output on stdout or stderr
# RUN: at line 8
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=65537 C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_65537
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=65537 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_65537
# note: command had no output on stdout or stderr
# RUN: at line 9
not c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=a C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c --check-prefix=CHECK_ERR_A
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=a 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c' --check-prefix=CHECK_ERR_A
# note: command had no output on stdout or stderr
# RUN: at line 10
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=2 -fuse-ld=lld C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefixes=CC1,OBJ C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=2 -fuse-ld=lld 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefixes=CC1,OBJ 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# RUN: at line 11
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -### -falign-loops=2 -fuse-ld=lld -flto C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefixes=CC1,LTO C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' '-###' -falign-loops=2 -fuse-ld=lld -flto 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefixes=CC1,LTO 'C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c:28:9: error: LTO: expected string not found in input
# | // LTO: "-plugin-opt=-align-loops=2"
# |         ^
# | <stdin>:7:57: note: scanning from here
# |  "C:\\_work\\llvm-project\\llvm-project\\build\\bin\\lld-link" "-out:a.exe" "-defaultlib:libcmt" "-defaultlib:oldnames" "-nologo" "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\lit-tmp-vqewvoc4\\falign-loops-3bb356.o"
# |                                                         ^
# | <stdin>:7:193: note: possible intended match here
# |  "C:\\_work\\llvm-project\\llvm-project\\build\\bin\\lld-link" "-out:a.exe" "-defaultlib:libcmt" "-defaultlib:oldnames" "-nologo" "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\lit-tmp-vqewvoc4\\falign-loops-3bb356.o"
# |                                                                                                                                                                                                 ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Driver\falign-loops.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: clang version 23.0.0git (https://github.com/llvm/llvm-project e5d66be4216b3a9b9144da85b9c4b763f9468ec4) 
# |             2: Target: x86_64-pc-windows-msvc 
# |             3: Thread model: posix 
# |             4: InstalledDir: C:\_work\llvm-project\llvm-project\build\bin 
# |             5: Build config: +assertions 
# |             6:  "C:\\_work\\llvm-project\\llvm-project\\build\\bin\\clang.exe" "-cc1" "-triple" "x86_64-pc-windows-msvc19.29.30159" "-emit-llvm-bc" "-flto=full" "-flto-unit" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "falign-loops.c" "-falign-loops=2" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-fms-volatile" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-fdebug-compilation-dir=C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\test\\Driver" "-fcoverage-compilation-dir=C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\test\\Driver" "-resource-dir" "C:\\_work\\llvm-project\\llvm-project\\build\\lib\\clang\\23" "-internal-isystem" "C:\\_work\\llvm-project\\llvm-project\\build\\lib\\clang\\23\\include" "-internal-isystem" "C:\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\ATLMFC\\include" "-internal-isystem" "C:\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\ucrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\shared" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\um" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\winrt" "-internal-isystem" "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\cppwinrt" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.29.30159" "-fskip-odr-check-in-gmf" "-fdelayed-template-parsing" "-faddrsig" "-o" "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\lit-tmp-vqewvoc4\\falign-loops-3bb356.o" "-x" "c" "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\Driver\\falign-loops.c" 
# |             7:  "C:\\_work\\llvm-project\\llvm-project\\build\\bin\\lld-link" "-out:a.exe" "-defaultlib:libcmt" "-defaultlib:oldnames" "-nologo" "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\lit-tmp-vqewvoc4\\falign-loops-3bb356.o" 
# | check:28'0                                                             X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:28'1                                                                                                                                                                                                     ?                                     possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list