[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-18 Thread Nico Weber via cfe-commits

nico wrote:

Looks like this breaks tests: http://45.33.8.238/linux/153081/step_6.txt

Please take a look and revert for now if it takes a while to fix.

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread Freddy Ye via cfe-commits

FreddyLeaf wrote:

> Looks like this breaks tests: http://45.33.8.238/linux/153081/step_6.txt
> 
> Please take a look and revert for now if it takes a while to fix.

Thanks reminding. Revert first.

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while 
building `clang,compiler-rt,llvm` at step 6 "Add check check-clang".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/140/builds/11093


Here is the relevant piece of the build log for the reference

```
Step 6 (Add check check-clang) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i386 -m32 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i386 -m32 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
RUN: at line 11: not 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i386 -m64 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i386 -m64 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
RUN: at line 16: 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i486 -m32 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i486 -m32 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 25: not 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i486 -m64 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck 
-match-full-lines 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i486 -m64 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 30: 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang 
-march=i586 -m32 -E -dM 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileC

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` 
running on `gribozavr4` while building `clang,compiler-rt,llvm` at step 6 
"test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/56/builds/12415


Here is the relevant piece of the build log for the reference

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i386 
-m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i386 -m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
RUN: at line 11: not /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang 
-march=i386 -m64 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i386 -m64 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
RUN: at line 16: /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i486 
-m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i486 -m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 25: not /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang 
-march=i486 -m64 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i486 -m64 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 30: /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i586 
-m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang -march=i586 -m32 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
RUN: at line 42: not /b/1/clang-x86_64-debian-fast/llvm.obj/bin/clang 
-march=i586 -m64 -E -dM 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -match-full-lines 
/b/1/clang-x86_64-debian-fast/llvm.src/clang/test/Preproce

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` 
running on `gribozavr4` while building `clang,compiler-rt,llvm` at step 6 
"test-build-unified-tree-check-clang".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/60/builds/12961


Here is the relevant piece of the build log for the reference

```
Step 6 (test-build-unified-tree-check-clang) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i386 -m32 
-E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i386 -m32 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 11: not /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i386 
-m64 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i386 -m64 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 16: /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i486 -m32 
-E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i486 -m32 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
RUN: at line 25: not /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i486 
-m64 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i486 -m64 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
RUN: at line 30: /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i586 -m32 
-E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
+ /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i586 -m32 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
RUN: at line 42: not /b/1/llvm-x86_64-debian-dylib/build/bin/clang -march=i586 
-m64 -E -dM 
/b/1/llvm-x86_64-debian-dylib/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -match-full-lines 
/b/1/llvm-x86_64-debian-dylib/llvm-p

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` 
running on `sie-win-worker` while building `clang,compiler-rt,llvm` at step 7 
"test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/46/builds/8042


Here is the relevant piece of the build log for the reference

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -march=i386 -m32 -E -dM 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe -match-full-lines 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' 
-march=i386 -m32 -E -dM 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -o - -target i386-unknown-linux
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 
-match-full-lines 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -check-prefix=CHECK_I386_M32
# RUN: at line 11
not z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -march=i386 -m64 -E -dM 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe -match-full-lines 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
# executed command: not 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' 
-march=i386 -m64 -E -dM 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -o - -target i386-unknown-linux
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 
-match-full-lines 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -check-prefix=CHECK_I386_M64
# RUN: at line 16
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -march=i486 -m32 -E -dM 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe -match-full-lines 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' 
-march=i486 -m32 -E -dM 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -o - -target i386-unknown-linux
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 
-match-full-lines 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -check-prefix=CHECK_I486_M32
# RUN: at line 25
not z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -march=i486 -m64 -E -dM 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe -match-full-lines 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
# executed command: not 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' 
-march=i486 -m64 -E -dM 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -o - -target i386-unknown-linux
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 
-match-full-lines 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -check-prefix=CHECK_I486_M64
# RUN: at line 30
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -march=i586 -m32 -E -dM 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe -match-full-lines 
Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' 
-march=i586 -m32 -E -dM 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -o - -target i386-unknown-linux
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 
-match-full-lines 
'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Preprocessor\predefined-arch-macros.c'
 -check-prefix=CHEC

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building 
`clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/174/builds/8597


Here is the relevant piece of the build log for the reference

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i386 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i386 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 11: not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i386 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i386 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
RUN: at line 16: 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i486 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i486 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
RUN: at line 25: not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i486 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck 
-match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i486 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 30: 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang 
-march=i586 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/test/Preprocessor/predefined-arch-mac

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` 
running on `premerge-linux-1` while building `clang,compiler-rt,llvm` at step 7 
"test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/153/builds/14933


Here is the relevant piece of the build log for the reference

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /build/buildbot/premerge-monolithic-linux/build/bin/clang 
-march=i386 -m32 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /build/buildbot/premerge-monolithic-linux/build/bin/clang -march=i386 -m32 -E 
-dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck 
-match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
RUN: at line 11: not /build/buildbot/premerge-monolithic-linux/build/bin/clang 
-march=i386 -m64 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not /build/buildbot/premerge-monolithic-linux/build/bin/clang -march=i386 
-m64 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck 
-match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
RUN: at line 16: /build/buildbot/premerge-monolithic-linux/build/bin/clang 
-march=i486 -m32 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /build/buildbot/premerge-monolithic-linux/build/bin/clang -march=i486 -m32 -E 
-dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck 
-match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
RUN: at line 25: not /build/buildbot/premerge-monolithic-linux/build/bin/clang 
-march=i486 -m64 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck 
-match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not /build/buildbot/premerge-monolithic-linux/build/bin/clang -march=i486 
-m64 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 30: /build/buildbot/premerge-monolithic-linux/build/bin/clang 
-march=i586 -m32 -E -dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -match-full-lines 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
+ /build/buildbot/premerge-monolithic-linux/build/bin/clang -march=i586 -m32 -E 
-dM 
/build/buildbot/premerge-monolithic-linux/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` 
running on `doug-worker-5` while building `clang,compiler-rt,llvm` at step 6 
"test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/190/builds/9663


Here is the relevant piece of the build log for the reference

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang 
-march=i386 -m32 -E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i386 -m32 
-E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
RUN: at line 11: not 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i386 -m64 
-E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i386 
-m64 -E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
RUN: at line 16: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang 
-march=i486 -m32 -E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i486 -m32 
-E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
RUN: at line 25: not 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i486 -m64 
-E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i486 
-m64 -E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
RUN: at line 30: /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang 
-march=i586 -m32 -E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck 
-match-full-lines 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I586_M32
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang -march=i586 -m32 
-E -dM 
/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Preprocessor/pred

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while 
building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/144/builds/11843


Here is the relevant piece of the build log for the reference

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
 TEST 'Clang :: Preprocessor/predefined-arch-macros.c' 
FAILED 
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i386 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i386 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M32
RUN: at line 11: not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i386 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I386_M64
+ not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i386 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
RUN: at line 16: 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i486 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i486 -m32 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M32
RUN: at line 25: not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i486 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - 2>&1  -target i386-unknown-linux| 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
+ not 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang 
-march=i486 -m64 -E -dM 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -o - -target i386-unknown-linux
+ 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck
 -match-full-lines 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Preprocessor/predefined-arch-macros.c
 -check-prefix=CHECK_I486_M64
RUN: at line 30: 
/home/buildbot/buildbot-root/llvm-clang-x

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf closed 
https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-15 Thread Phoebe Wang via cfe-commits

https://github.com/phoebewang approved this pull request.

LGTM.

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-15 Thread Freddy Ye via cfe-commits


@@ -1155,6 +1155,34 @@ def ProcessorFeatures {
   list GNRDFeatures =
 !listconcat(GNRFeatures, GNRDAdditionalFeatures);
 
+  // Diamond Rapids
+  list DMRAdditionalFeatures = [FeatureAVX10_2_512,
+  FeatureAMXCOMPLEX,

FreddyLeaf wrote:

ab477fb

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-15 Thread Freddy Ye via cfe-commits


@@ -381,6 +389,8 @@ constexpr ProcInfo Processors[] = {
   { {"emeraldrapids"}, CK_Emeraldrapids, FEATURE_AVX512FP16, 
FeaturesSapphireRapids, 'n', false },
   // Clearwaterforest microarchitecture based processors.
   { {"clearwaterforest"}, CK_Lunarlake, FEATURE_AVX2, 
FeaturesClearwaterforest, 'p', false },
+  // Diamond Rapids microarchitecture based processors.
+  { {"diamondrapids"}, CK_DiamondRapids, FEATURE_AVX10_2_512, 
FeaturesDiamondRapids, 'z', false },

FreddyLeaf wrote:

ab477fb

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits


@@ -121,6 +121,7 @@ enum CPUKind {
   CK_GraniterapidsD,
   CK_Emeraldrapids,
   CK_Clearwaterforest,
+  CK_DiamondRapids,

FreddyLeaf wrote:

ab477fb

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf updated 
https://github.com/llvm/llvm-project/pull/113881

>From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001
From: Freddy Ye 
Date: Mon, 21 Oct 2024 15:27:24 +0800
Subject: [PATCH 1/6] [X86] Support -march=diamondrapids

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
---
 clang/lib/Basic/Targets/X86.cpp   |  2 +
 clang/test/CodeGen/attr-cpuspecific-cpus.c|  1 +
 clang/test/CodeGen/attr-target-mv.c   |  1 +
 clang/test/CodeGen/target-builtin-noerror.c   |  1 +
 clang/test/Driver/x86-march.c |  4 ++
 clang/test/Misc/target-invalid-cpu-note/x86.c |  4 ++
 .../Preprocessor/predefined-arch-macros.c | 42 +++
 compiler-rt/lib/builtins/cpu_model/x86.c  | 14 +++
 .../llvm/TargetParser/X86TargetParser.def |  1 +
 .../llvm/TargetParser/X86TargetParser.h   |  1 +
 llvm/lib/Target/X86/X86.td| 24 +++
 llvm/lib/TargetParser/Host.cpp| 13 ++
 llvm/lib/TargetParser/X86TargetParser.cpp |  8 
 llvm/test/CodeGen/X86/cpus-intel.ll   |  2 +
 14 files changed, 118 insertions(+)

diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont
@@ -155,6 +156,7 @@
 // X86_64-SAME: {{^}}, granitera

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits


@@ -121,6 +121,7 @@ enum CPUKind {
   CK_GraniterapidsD,
   CK_Emeraldrapids,
   CK_Clearwaterforest,
+  CK_DiamondRapids,

FreddyLeaf wrote:

I prefer your style, too. Let's refine CK_SapphireRapids as well in the future

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Phoebe Wang via cfe-commits


@@ -1155,6 +1155,34 @@ def ProcessorFeatures {
   list GNRDFeatures =
 !listconcat(GNRFeatures, GNRDAdditionalFeatures);
 
+  // Diamond Rapids
+  list DMRAdditionalFeatures = [FeatureAVX10_2_512,
+  FeatureAMXCOMPLEX,

phoebewang wrote:

`FeatureAMXCOMPLEX` alreay inherited from `GNRDFeatures`.

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Phoebe Wang via cfe-commits


@@ -381,6 +389,8 @@ constexpr ProcInfo Processors[] = {
   { {"emeraldrapids"}, CK_Emeraldrapids, FEATURE_AVX512FP16, 
FeaturesSapphireRapids, 'n', false },
   // Clearwaterforest microarchitecture based processors.
   { {"clearwaterforest"}, CK_Lunarlake, FEATURE_AVX2, 
FeaturesClearwaterforest, 'p', false },
+  // Diamond Rapids microarchitecture based processors.
+  { {"diamondrapids"}, CK_DiamondRapids, FEATURE_AVX10_2_512, 
FeaturesDiamondRapids, 'z', false },

phoebewang wrote:

ditto.

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Phoebe Wang via cfe-commits


@@ -121,6 +121,7 @@ enum CPUKind {
   CK_GraniterapidsD,
   CK_Emeraldrapids,
   CK_Clearwaterforest,
+  CK_DiamondRapids,

phoebewang wrote:

CK_Diamondrapids?

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf updated 
https://github.com/llvm/llvm-project/pull/113881

>From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001
From: Freddy Ye 
Date: Mon, 21 Oct 2024 15:27:24 +0800
Subject: [PATCH 1/5] [X86] Support -march=diamondrapids

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
---
 clang/lib/Basic/Targets/X86.cpp   |  2 +
 clang/test/CodeGen/attr-cpuspecific-cpus.c|  1 +
 clang/test/CodeGen/attr-target-mv.c   |  1 +
 clang/test/CodeGen/target-builtin-noerror.c   |  1 +
 clang/test/Driver/x86-march.c |  4 ++
 clang/test/Misc/target-invalid-cpu-note/x86.c |  4 ++
 .../Preprocessor/predefined-arch-macros.c | 42 +++
 compiler-rt/lib/builtins/cpu_model/x86.c  | 14 +++
 .../llvm/TargetParser/X86TargetParser.def |  1 +
 .../llvm/TargetParser/X86TargetParser.h   |  1 +
 llvm/lib/Target/X86/X86.td| 24 +++
 llvm/lib/TargetParser/Host.cpp| 13 ++
 llvm/lib/TargetParser/X86TargetParser.cpp |  8 
 llvm/test/CodeGen/X86/cpus-intel.ll   |  2 +
 14 files changed, 118 insertions(+)

diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont
@@ -155,6 +156,7 @@
 // X86_64-SAME: {{^}}, granitera

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits


@@ -600,6 +601,19 @@ static const char 
*getIntelProcessorTypeAndSubtype(unsigned Family,
   break;
 }
 break;
+  case 19:
+switch (Model) {
+// Diamondrapids:
+case 0x01:
+  CPU = "diamondrapids";
+  *Type = INTEL_COREI7;
+  *Subtype = INTEL_COREI7_DIAMONDRAPIDS;
+  break;
+
+default: // Unknown family 0x13 CPU.

FreddyLeaf wrote:

[52e63a0](https://github.com/llvm/llvm-project/pull/113881/commits/52e63a0f4b48ad106471343f2f48976bd9b84661)

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits


@@ -1139,6 +1139,28 @@ def ProcessorFeatures {
   list GNRDFeatures =
 !listconcat(GNRFeatures, GNRDAdditionalFeatures);
 
+  // Diamondrapids

FreddyLeaf wrote:

[52e63a0](https://github.com/llvm/llvm-project/pull/113881/commits/52e63a0f4b48ad106471343f2f48976bd9b84661)

https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-10-28 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf updated 
https://github.com/llvm/llvm-project/pull/113881

>From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001
From: Freddy Ye 
Date: Mon, 21 Oct 2024 15:27:24 +0800
Subject: [PATCH 1/2] [X86] Support -march=diamondrapids

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
---
 clang/lib/Basic/Targets/X86.cpp   |  2 +
 clang/test/CodeGen/attr-cpuspecific-cpus.c|  1 +
 clang/test/CodeGen/attr-target-mv.c   |  1 +
 clang/test/CodeGen/target-builtin-noerror.c   |  1 +
 clang/test/Driver/x86-march.c |  4 ++
 clang/test/Misc/target-invalid-cpu-note/x86.c |  4 ++
 .../Preprocessor/predefined-arch-macros.c | 42 +++
 compiler-rt/lib/builtins/cpu_model/x86.c  | 14 +++
 .../llvm/TargetParser/X86TargetParser.def |  1 +
 .../llvm/TargetParser/X86TargetParser.h   |  1 +
 llvm/lib/Target/X86/X86.td| 24 +++
 llvm/lib/TargetParser/Host.cpp| 13 ++
 llvm/lib/TargetParser/X86TargetParser.cpp |  8 
 llvm/test/CodeGen/X86/cpus-intel.ll   |  2 +
 14 files changed, 118 insertions(+)

diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont
@@ -155,6 +156,7 @@
 // X86_64-SAME: {{^}}, granitera

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-10-28 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf updated 
https://github.com/llvm/llvm-project/pull/113881

>From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001
From: Freddy Ye 
Date: Mon, 21 Oct 2024 15:27:24 +0800
Subject: [PATCH 1/3] [X86] Support -march=diamondrapids

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
---
 clang/lib/Basic/Targets/X86.cpp   |  2 +
 clang/test/CodeGen/attr-cpuspecific-cpus.c|  1 +
 clang/test/CodeGen/attr-target-mv.c   |  1 +
 clang/test/CodeGen/target-builtin-noerror.c   |  1 +
 clang/test/Driver/x86-march.c |  4 ++
 clang/test/Misc/target-invalid-cpu-note/x86.c |  4 ++
 .../Preprocessor/predefined-arch-macros.c | 42 +++
 compiler-rt/lib/builtins/cpu_model/x86.c  | 14 +++
 .../llvm/TargetParser/X86TargetParser.def |  1 +
 .../llvm/TargetParser/X86TargetParser.h   |  1 +
 llvm/lib/Target/X86/X86.td| 24 +++
 llvm/lib/TargetParser/Host.cpp| 13 ++
 llvm/lib/TargetParser/X86TargetParser.cpp |  8 
 llvm/test/CodeGen/X86/cpus-intel.ll   |  2 +
 14 files changed, 118 insertions(+)

diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont
@@ -155,6 +156,7 @@
 // X86_64-SAME: {{^}}, granitera

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-10-28 Thread via cfe-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff 86f76c3b171f95fd0560339f2ad0f4449277cf8d 
4a7f17f29a007ce7af0893670a362f738b0d8d6e --extensions h,c,cpp -- 
clang/lib/Basic/Targets/X86.cpp clang/test/CodeGen/attr-cpuspecific-cpus.c 
clang/test/CodeGen/attr-target-mv.c clang/test/CodeGen/target-builtin-noerror.c 
clang/test/Driver/x86-march.c clang/test/Misc/target-invalid-cpu-note/x86.c 
clang/test/Preprocessor/predefined-arch-macros.c 
compiler-rt/lib/builtins/cpu_model/x86.c 
llvm/include/llvm/TargetParser/X86TargetParser.h llvm/lib/TargetParser/Host.cpp 
llvm/lib/TargetParser/X86TargetParser.cpp
``





View the diff from clang-format here.


``diff
diff --git a/llvm/lib/TargetParser/X86TargetParser.cpp 
b/llvm/lib/TargetParser/X86TargetParser.cpp
index f21ccf2b4b..bbe214fe57 100644
--- a/llvm/lib/TargetParser/X86TargetParser.cpp
+++ b/llvm/lib/TargetParser/X86TargetParser.cpp
@@ -140,10 +140,10 @@ constexpr FeatureBitset FeaturesGraniteRapids =
 FeaturesSapphireRapids | FeatureAMX_FP16 | FeaturePREFETCHI;
 constexpr FeatureBitset FeaturesDiamondRapids =
 FeaturesGraniteRapids | FeatureAMX_COMPLEX | FeatureAVX10_2_512 |
-FeatureCMPCCXADD | FeatureAVXIFMA | FeatureAVXNECONVERT | 
FeatureAVXVNNIINT8 |
-FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 | FeatureSM4 | 
FeatureEGPR |
-FeatureZU | FeatureCCMP | FeaturePush2Pop2 | FeaturePPX | FeatureNDD | 
FeatureNF |
-FeatureCF;
+FeatureCMPCCXADD | FeatureAVXIFMA | FeatureAVXNECONVERT |
+FeatureAVXVNNIINT8 | FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 |
+FeatureSM4 | FeatureEGPR | FeatureZU | FeatureCCMP | FeaturePush2Pop2 |
+FeaturePPX | FeatureNDD | FeatureNF | FeatureCF;
 
 // Intel Atom processors.
 // Bonnell has feature parity with Core2 and adds MOVBE.

``




https://github.com/llvm/llvm-project/pull/113881
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-10-28 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Freddy Ye (FreddyLeaf)


Changes

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368


---
Full diff: https://github.com/llvm/llvm-project/pull/113881.diff


14 Files Affected:

- (modified) clang/lib/Basic/Targets/X86.cpp (+2) 
- (modified) clang/test/CodeGen/attr-cpuspecific-cpus.c (+1) 
- (modified) clang/test/CodeGen/attr-target-mv.c (+1) 
- (modified) clang/test/CodeGen/target-builtin-noerror.c (+1) 
- (modified) clang/test/Driver/x86-march.c (+4) 
- (modified) clang/test/Misc/target-invalid-cpu-note/x86.c (+4) 
- (modified) clang/test/Preprocessor/predefined-arch-macros.c (+42) 
- (modified) compiler-rt/lib/builtins/cpu_model/x86.c (+14) 
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.def (+1) 
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.h (+1) 
- (modified) llvm/lib/Target/X86/X86.td (+24) 
- (modified) llvm/lib/TargetParser/Host.cpp (+13) 
- (modified) llvm/lib/TargetParser/X86TargetParser.cpp (+8) 
- (modified) llvm/test/CodeGen/X86/cpus-intel.ll (+2) 


``diff
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont
@@ -155,6 +156,7 @@
 // X86_64-SAME: {{^}}, graniterapids-d
 // X86_64-SAME: {{^}}, emeraldrapids
 // X86_64-SAME: {{^}}, clearwaterforest
+//

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-10-28 Thread Freddy Ye via cfe-commits

https://github.com/FreddyLeaf created 
https://github.com/llvm/llvm-project/pull/113881

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368


>From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001
From: Freddy Ye 
Date: Mon, 21 Oct 2024 15:27:24 +0800
Subject: [PATCH] [X86] Support -march=diamondrapids

Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
---
 clang/lib/Basic/Targets/X86.cpp   |  2 +
 clang/test/CodeGen/attr-cpuspecific-cpus.c|  1 +
 clang/test/CodeGen/attr-target-mv.c   |  1 +
 clang/test/CodeGen/target-builtin-noerror.c   |  1 +
 clang/test/Driver/x86-march.c |  4 ++
 clang/test/Misc/target-invalid-cpu-note/x86.c |  4 ++
 .../Preprocessor/predefined-arch-macros.c | 42 +++
 compiler-rt/lib/builtins/cpu_model/x86.c  | 14 +++
 .../llvm/TargetParser/X86TargetParser.def |  1 +
 .../llvm/TargetParser/X86TargetParser.h   |  1 +
 llvm/lib/Target/X86/X86.td| 24 +++
 llvm/lib/TargetParser/Host.cpp| 13 ++
 llvm/lib/TargetParser/X86TargetParser.cpp |  8 
 llvm/test/CodeGen/X86/cpus-intel.ll   |  2 +
 14 files changed, 118 insertions(+)

diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index d067ec218b5270..7787bbde513dcf 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -649,6 +649,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   case CK_GraniterapidsD:
   case CK_Emeraldrapids:
   case CK_Clearwaterforest:
+  case CK_DiamondRapids:
 // FIXME: Historically, we defined this legacy name, it would be nice to
 // remove it at some point. We've never exposed fine-grained names for
 // recent primary x86 CPUs, and we should keep it that way.
@@ -1613,6 +1614,7 @@ std::optional 
X86TargetInfo::getCPUCacheLineSize() const {
 case CK_GraniterapidsD:
 case CK_Emeraldrapids:
 case CK_Clearwaterforest:
+case CK_DiamondRapids:
 case CK_KNL:
 case CK_KNM:
 // K7
diff --git a/clang/test/CodeGen/attr-cpuspecific-cpus.c 
b/clang/test/CodeGen/attr-cpuspecific-cpus.c
index dd154fd227b25b..1dd095ec9e191f 100644
--- a/clang/test/CodeGen/attr-cpuspecific-cpus.c
+++ b/clang/test/CodeGen/attr-cpuspecific-cpus.c
@@ -43,6 +43,7 @@ ATTR(cpu_specific(icelake_client)) void CPU(void){}
 ATTR(cpu_specific(tigerlake)) void CPU(void){}
 ATTR(cpu_specific(alderlake)) void CPU(void){}
 ATTR(cpu_specific(sapphirerapids)) void CPU(void){}
+ATTR(cpu_specific(diamondrapids)) void CPU(void){}
 
 // ALIAS CPUs
 ATTR(cpu_specific(pentium_iii_no_xmm_regs)) void CPU0(void){}
diff --git a/clang/test/CodeGen/attr-target-mv.c 
b/clang/test/CodeGen/attr-target-mv.c
index 2c4b95ca04370a..6911b55203b7e7 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -29,6 +29,7 @@ int __attribute__((target("arch=lunarlake"))) foo(void) 
{return 23;}
 int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
 int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
 int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
+int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
 int bar(void) {
diff --git a/clang/test/CodeGen/target-builtin-noerror.c 
b/clang/test/CodeGen/target-builtin-noerror.c
index 1e53621bc6b5ae..0bbd8c3e5ddd81 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -209,4 +209,5 @@ void verifycpustrings(void) {
   (void)__builtin_cpu_is("znver3");
   (void)__builtin_cpu_is("znver4");
   (void)__builtin_cpu_is("znver5");
+  (void)__builtin_cpu_is("diamondrapids");
 }
diff --git a/clang/test/Driver/x86-march.c b/clang/test/Driver/x86-march.c
index 3bc2a82ae778d6..341f01c8d668df 100644
--- a/clang/test/Driver/x86-march.c
+++ b/clang/test/Driver/x86-march.c
@@ -120,6 +120,10 @@
 // RUN:   | FileCheck %s -check-prefix=clearwaterforest
 // clearwaterforest: "-target-cpu" "clearwaterforest"
 //
+// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 
2>&1 \
+// RUN:   | FileCheck %s -check-prefix=diamondrapids
+// diamondrapids: "-target-cpu" "diamondrapids"
+//
 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=lakemont
 // lakemont: "-target-cpu" "lakemont"
diff --git a/clang/test/Misc/target-invalid-cpu-note/x86.c 
b/clang/test/Misc/target-invalid-cpu-note/x86.c
index 7879676040af46..f89cdc2aa573ff 100644
--- a/clang/test/Misc/target-invalid-cpu-note/x86.c
+++ b/clang/test/Misc/target-invalid-cpu-note/x86.c
@@ -69,6 +69,7 @@
 // X86-SAME: {{^}}, graniterapids-d
 // X86-SAME: {{^}}, emeraldrapids
 // X86-SAME: {{^}}, clearwaterforest
+// X86-SAME: {{^}}, diamondrapids
 // X86-SAME: {{^}}, knl
 // X86-SAME: {{^}}, knm
 // X86-SAME: {{^}}, lakemont