brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · 92ad12d Raw
90 lines · plain
1! Test that -mcpu/march are used and that the -target-cpu and -target-features2! are also added to the fc1 command.3 4! RUN: %flang --target=aarch64-linux-gnu -mcpu=cortex-a57 -c %s -### 2>&1 \5! RUN: | FileCheck %s -check-prefix=CHECK-A576 7! RUN: %flang --target=aarch64-linux-gnu -mcpu=cortex-a76 -c %s -### 2>&1 \8! RUN: | FileCheck %s -check-prefix=CHECK-A769 10! RUN: %flang --target=aarch64-linux-gnu -march=armv9 -c %s -### 2>&1 \11! RUN: | FileCheck %s -check-prefix=CHECK-ARMV912 13! Negative test. ARM cpu with x86 target.14! RUN: not %flang --target=x86_64-linux-gnu -mcpu=cortex-a57 -c %s -### 2>&1 \15! RUN: | FileCheck %s -check-prefix=CHECK-NO-A5716 17! RUN: %flang --target=x86_64-linux-gnu -march=skylake -c %s -### 2>&1 \18! RUN: | FileCheck %s -check-prefix=CHECK-SKYLAKE19 20! RUN: %flang --target=x86_64-linux-gnu -mapx-features=egpr -c %s -### 2>&1 \21! RUN: | FileCheck %s -check-prefix=CHECK-APX22 23! RUN: %flang --target=x86_64-linux-gnu -mno-apx-features=ccmp -c %s -### 2>&1 \24! RUN: | FileCheck %s -check-prefix=CHECK-NO-APX25 26! RUN: %flang --target=x86_64h-linux-gnu -c %s -### 2>&1 \27! RUN: | FileCheck %s -check-prefix=CHECK-X86_64H28 29! RUN: %flang --target=riscv64-linux-gnu -c %s -### 2>&1 \30! RUN: | FileCheck %s -check-prefix=CHECK-RV6431 32! RUN: %flang --target=amdgcn-amd-amdhsa -mcpu=gfx908 -nogpulib -c %s -### 2>&1 \33! RUN: | FileCheck %s -check-prefix=CHECK-AMDGPU34 35! RUN: %flang --target=r600-unknown-unknown -mcpu=cayman -nogpulib -c %s -### 2>&1 \36! RUN: | FileCheck %s -check-prefix=CHECK-AMDGPU-R60037 38! RUN: %flang --target=loongarch64-linux-gnu -c %s -### 2>&1 \39! RUN: | FileCheck %s -check-prefix=CHECK-LOONGARCH6440 41! RUN: %flang --target=sparc64-linux-gnu -c -### %s 2>&1  | FileCheck %s -check-prefix=CHECK-SPARC-VIS42! RUN: %flang --target=sparc64-freebsd -c -### %s 2>&1  | FileCheck %s -check-prefix=CHECK-SPARC-VIS43! RUN: %flang --target=sparc64-openbsd -c -### %s 2>&1  | FileCheck %s -check-prefix=CHECK-SPARC-VIS44 45! CHECK-A57: "-fc1" "-triple" "aarch64-unknown-linux-gnu"46! CHECK-A57-SAME: "-target-cpu" "cortex-a57"47! CHECK-A57-SAME: "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha248 49! CHECK-A76: "-fc1" "-triple" "aarch64-unknown-linux-gnu"50! CHECK-A76-SAME: "-target-cpu" "cortex-a76"51! CHECK-A76-SAME: "-target-feature" "+v8.2a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2" "-target-feature" "+ssbs"52 53! CHECK-ARMV9: "-fc1" "-triple" "aarch64-unknown-linux-gnu"54! CHECK-ARMV9-SAME: "-target-cpu" "generic"55! CHECK-ARMV9-SAME: "-target-feature" "+v9a"56! CHECK-ARMV9-SAME: "-target-feature" "+sve"57! CHECK-ARMV9-SAME: "-target-feature" "+sve2"58 59! CHECK-NO-A57: "-fc1" "-triple" "x86_64-unknown-linux-gnu"60! CHECK-NO-A57-NOT: cortex-a5761! CHECK-NO-A57-SAME: "-target-cpu" "x86-64"62! CHECK-NO-A57-NOT: cortex-a5763 64! CHECK-SKYLAKE: "-fc1" "-triple" "x86_64-unknown-linux-gnu"65! CHECK-SKYLAKE-SAME: "-target-cpu" "skylake"66 67! CHECK-APX: "-fc1" "-triple" "x86_64-unknown-linux-gnu"68! CHECK-APX-SAME: "-target-feature" "+egpr"69 70! CHECK-NO-APX: "-fc1" "-triple" "x86_64-unknown-linux-gnu"71! CHECK-NO-APX-SAME: "-target-feature" "-ccmp"72 73! CHECK-X86_64H: "-fc1" "-triple" "x86_64h-unknown-linux-gnu"74! CHECK-X86_64H-SAME: "-target-cpu" "x86-64" "-target-feature" "-rdrnd" "-target-feature" "-aes" "-target-feature" "-pclmul" "-target-feature" "-rtm" "-target-feature" "-fsgsbase"75 76! CHECK-RV64: "-fc1" "-triple" "riscv64-unknown-linux-gnu"77! CHECK-RV64-SAME: "-target-cpu" "generic-rv64" "-target-feature" "+i" "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+c"78 79! CHECK-AMDGPU: "-fc1" "-triple" "amdgcn-amd-amdhsa"80! CHECK-AMDGPU-SAME: "-target-cpu" "gfx908"81 82! CHECK-AMDGPU-R600: "-fc1" "-triple" "r600-unknown-unknown"83! CHECK-AMDGPU-R600-SAME: "-target-cpu" "cayman"84 85! CHECK-LOONGARCH64: "-fc1" "-triple" "loongarch64-unknown-linux-gnu"86! CHECK-LOONGARCH64-SAME: "-target-cpu" "loongarch64" "-target-feature" "+lsx" "-target-feature" "+relax" "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+ual"87 88! CHECK-SPARC-VIS: "-fc1" "-triple" "sparc64-{{[^"]+}}"89! CHECK-SPARC-VIS-SAME: "-target-feature" "+vis"90