Skip to content

[X86][AVX10.2] Fix wrong predicates for BF16 feature #113800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

phoebewang
Copy link
Contributor

Since AVX10.2, we need to enable 128/256-bit vector by default and check for 512 feature for 512-bit vector.

Since AVX10.2, we need to enable 128/256-bit vector by default and check
for 512 feature for 512-bit vector.
@llvmbot
Copy link
Member

llvmbot commented Oct 27, 2024

@llvm/pr-subscribers-backend-x86

Author: Phoebe Wang (phoebewang)

Changes

Since AVX10.2, we need to enable 128/256-bit vector by default and check for 512 feature for 512-bit vector.


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

2 Files Affected:

  • (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+19-22)
  • (modified) llvm/test/CodeGen/X86/avx10_2bf16-arith.ll (+22)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a6d77873ec2901..9d447959faf55a 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -2406,7 +2406,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     addLegalFPImmediate(APFloat::getZero(APFloat::BFloat()));
   }
 
-  if (!Subtarget.useSoftFloat() && Subtarget.hasBF16()) {
+  if (!Subtarget.useSoftFloat() && Subtarget.hasBF16() &&
+      Subtarget.useAVX512Regs()) {
     addRegisterClass(MVT::v32bf16, &X86::VR512RegClass);
     setF16Action(MVT::v32bf16, Expand);
     for (unsigned Opc : {ISD::FADD, ISD::FSUB, ISD::FMUL, ISD::FDIV})
@@ -2419,27 +2420,23 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
   }
 
   if (!Subtarget.useSoftFloat() && Subtarget.hasAVX10_2()) {
-    addRegisterClass(MVT::v8bf16, &X86::VR128XRegClass);
-    addRegisterClass(MVT::v16bf16, &X86::VR256XRegClass);
-    addRegisterClass(MVT::v32bf16, &X86::VR512RegClass);
-
-    setOperationAction(ISD::FADD, MVT::v32bf16, Legal);
-    setOperationAction(ISD::FSUB, MVT::v32bf16, Legal);
-    setOperationAction(ISD::FMUL, MVT::v32bf16, Legal);
-    setOperationAction(ISD::FDIV, MVT::v32bf16, Legal);
-    setOperationAction(ISD::FSQRT, MVT::v32bf16, Legal);
-    setOperationAction(ISD::FMA, MVT::v32bf16, Legal);
-    setOperationAction(ISD::SETCC, MVT::v32bf16, Custom);
-    if (Subtarget.hasVLX()) {
-      for (auto VT : {MVT::v8bf16, MVT::v16bf16}) {
-        setOperationAction(ISD::FADD, VT, Legal);
-        setOperationAction(ISD::FSUB, VT, Legal);
-        setOperationAction(ISD::FMUL, VT, Legal);
-        setOperationAction(ISD::FDIV, VT, Legal);
-        setOperationAction(ISD::FSQRT, VT, Legal);
-        setOperationAction(ISD::FMA, VT, Legal);
-        setOperationAction(ISD::SETCC, VT, Custom);
-      }
+    for (auto VT : {MVT::v8bf16, MVT::v16bf16}) {
+      setOperationAction(ISD::FADD, VT, Legal);
+      setOperationAction(ISD::FSUB, VT, Legal);
+      setOperationAction(ISD::FMUL, VT, Legal);
+      setOperationAction(ISD::FDIV, VT, Legal);
+      setOperationAction(ISD::FSQRT, VT, Legal);
+      setOperationAction(ISD::FMA, VT, Legal);
+      setOperationAction(ISD::SETCC, VT, Custom);
+    }
+    if (Subtarget.hasAVX10_2_512()) {
+      setOperationAction(ISD::FADD, MVT::v32bf16, Legal);
+      setOperationAction(ISD::FSUB, MVT::v32bf16, Legal);
+      setOperationAction(ISD::FMUL, MVT::v32bf16, Legal);
+      setOperationAction(ISD::FDIV, MVT::v32bf16, Legal);
+      setOperationAction(ISD::FSQRT, MVT::v32bf16, Legal);
+      setOperationAction(ISD::FMA, MVT::v32bf16, Legal);
+      setOperationAction(ISD::SETCC, MVT::v32bf16, Custom);
     }
   }
 
diff --git a/llvm/test/CodeGen/X86/avx10_2bf16-arith.ll b/llvm/test/CodeGen/X86/avx10_2bf16-arith.ll
index e0f5679e8ac96d..c97d27ff324bbb 100644
--- a/llvm/test/CodeGen/X86/avx10_2bf16-arith.ll
+++ b/llvm/test/CodeGen/X86/avx10_2bf16-arith.ll
@@ -1166,3 +1166,25 @@ entry:
   %2 = select <8 x i1> %1, <8 x bfloat> %0, <8 x bfloat> zeroinitializer
   ret <8 x bfloat> %2
 }
+
+define <32 x bfloat> @addv(<32 x bfloat> %a, <32 x bfloat> %b) nounwind {
+; X64-LABEL: addv:
+; X64:       # %bb.0:
+; X64-NEXT:    vaddnepbf16 %ymm2, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x7d,0x28,0x58,0xc2]
+; X64-NEXT:    vaddnepbf16 %ymm3, %ymm1, %ymm1 # encoding: [0x62,0xf5,0x75,0x28,0x58,0xcb]
+; X64-NEXT:    retq # encoding: [0xc3]
+;
+; X86-LABEL: addv:
+; X86:       # %bb.0:
+; X86-NEXT:    pushl %ebp # encoding: [0x55]
+; X86-NEXT:    movl %esp, %ebp # encoding: [0x89,0xe5]
+; X86-NEXT:    andl $-32, %esp # encoding: [0x83,0xe4,0xe0]
+; X86-NEXT:    subl $32, %esp # encoding: [0x83,0xec,0x20]
+; X86-NEXT:    vaddnepbf16 %ymm2, %ymm0, %ymm0 # encoding: [0x62,0xf5,0x7d,0x28,0x58,0xc2]
+; X86-NEXT:    vaddnepbf16 8(%ebp), %ymm1, %ymm1 # encoding: [0x62,0xf5,0x75,0x28,0x58,0x8d,0x08,0x00,0x00,0x00]
+; X86-NEXT:    movl %ebp, %esp # encoding: [0x89,0xec]
+; X86-NEXT:    popl %ebp # encoding: [0x5d]
+; X86-NEXT:    retl # encoding: [0xc3]
+  %add = fadd <32 x bfloat> %a, %b
+  ret <32 x bfloat> %add
+}

@@ -2419,27 +2420,23 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
}

if (!Subtarget.useSoftFloat() && Subtarget.hasAVX10_2()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to check VLX here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't. VLX is a concept of legacy AVX512 features. We have to reuse it for 10.1, but since 10.2, we don't need it anymore.

Copy link
Contributor

@KanRobert KanRobert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@FreddyLeaf FreddyLeaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phoebewang phoebewang merged commit 40fffba into llvm:main Oct 28, 2024
10 checks passed
@phoebewang phoebewang deleted the bf162 branch October 28, 2024 01:54
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 28, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime running on omp-vega20-0 while building llvm at step 7 "Add check check-offload".

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

Here is the relevant piece of the build log for the reference
Step 7 (Add check check-offload) failure: test (failure)
...
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug53727.cpp (869 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug50022.cpp (870 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/test_libc.cpp (871 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/wtime.c (872 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/bug49021.cpp (873 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/std_complex_arithmetic.cpp (874 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/complex_reduction.cpp (875 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug49021.cpp (876 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/std_complex_arithmetic.cpp (877 of 879)
TIMEOUT: libomptarget :: amdgcn-amd-amdhsa :: offloading/dynamic-schedule-non-spmd.cpp (878 of 879)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: offloading/dynamic-schedule-non-spmd.cpp' FAILED ********************
Exit Code: -9
Timeout: Reached timeout of 100 seconds

Command Output (stdout):
--
# RUN: at line 2
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp    -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/dynamic-schedule-non-spmd.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/dynamic-schedule-non-spmd.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a && /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/dynamic-schedule-non-spmd.cpp.tmp 2>&1 | /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/dynamic-schedule-non-spmd.cpp
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/dynamic-schedule-non-spmd.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/dynamic-schedule-non-spmd.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# note: command had no output on stdout or stderr
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/dynamic-schedule-non-spmd.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -9
# error: command reached timeout: True
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/dynamic-schedule-non-spmd.cpp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -9
# error: command reached timeout: True

--

********************
TIMEOUT: libomptarget :: amdgcn-amd-amdhsa :: offloading/parallel_offloading_map.cpp (879 of 879)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: offloading/parallel_offloading_map.cpp' FAILED ********************
Exit Code: -9
Timeout: Reached timeout of 100 seconds

Command Output (stdout):
--
# RUN: at line 1
/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp    -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/parallel_offloading_map.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/parallel_offloading_map.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a && /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/parallel_offloading_map.cpp.tmp | /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/parallel_offloading_map.cpp
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/clang++ -fopenmp -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test -I /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -L /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -nogpulib -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/parallel_offloading_map.cpp -o /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/parallel_offloading_map.cpp.tmp /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./lib/libomptarget.devicertl.a
# note: command had no output on stdout or stderr
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/offloading/Output/parallel_offloading_map.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -9
# error: command reached timeout: True
# executed command: /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.build/./bin/FileCheck /home/ompworker/bbot/openmp-offload-amdgpu-runtime/llvm.src/offload/test/offloading/parallel_offloading_map.cpp
# note: command had no output on stdout or stderr

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 28, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-libc-amdgpu-runtime running on omp-vega20-1 while building llvm at step 10 "Add check check-offload".

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

Here is the relevant piece of the build log for the reference
Step 10 (Add check check-offload) failure: 1200 seconds without output running [b'ninja', b'-j 32', b'check-offload'], attempting to kill
...
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug47654.cpp (866 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug50022.cpp (867 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug53727.cpp (868 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/test_libc.cpp (869 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/wtime.c (870 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/std_complex_arithmetic.cpp (871 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: offloading/bug49021.cpp (872 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/complex_reduction.cpp (873 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/bug49021.cpp (874 of 879)
PASS: libomptarget :: x86_64-unknown-linux-gnu-LTO :: offloading/std_complex_arithmetic.cpp (875 of 879)
command timed out: 1200 seconds without output running [b'ninja', b'-j 32', b'check-offload'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1238.489033

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 28, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-qemu running on sanitizer-buildbot4 while building llvm at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[305/310] Generating ../../bin/llvm-readelf
[306/310] Generating ../../bin/llvm-strip
[307/310] Linking CXX executable bin/llvm-nm
[308/310] Linking CXX executable bin/sancov
[309/310] Linking CXX executable bin/llvm-objdump
[309/310] Running the HWAddressSanitizer tests with Intel LAM
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/lit.common.cfg.py:380: warning: %device_rm is not implemented
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 108 of 109 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/Posix/ignore_free_hook.cpp (64 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/Posix/ignore_free_hook.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang  --driver-mode=g++  -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -O2 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp -DTEST=basic_hook_works && not env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp    2>&1 | FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -check-prefix=CHECK-BASIC
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -O2 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp -DTEST=basic_hook_works
+ not env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -check-prefix=CHECK-BASIC
/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:45:18: error: CHECK-BASIC: expected string not found in input
 // CHECK-BASIC: Free Hook
                 ^
<stdin>:1:15: note: scanning from here
Free Respected
              ^
<stdin>:6:142: note: possible intended match here
 #2 0x561c3c8dc8ca in basic_hook_works /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:46:13
                                                                                                                                             ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: Free Respected 
check:45'0                   X error: no match found
            2: ==682==ERROR: HWAddressSanitizer: tag-mismatch on address 0x73ddfffe0000 at pc 0x561c3c88f46a 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: WRITE of size 1 at 0x73ddfffe0000 tags: 11/12 (ptr/mem) in thread T0 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4:  #0 0x561c3c88f46a in SigTrap<(__hwasan::ErrorAction)0, (__hwasan::AccessType)1, 0UL> /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_checks.h:67:3 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  #1 0x561c3c88f46a in __hwasan_store1 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan.cpp:589:3 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6:  #2 0x561c3c8dc8ca in basic_hook_works /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:46:13 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 30 (test hwasan x86_64_lam_qemu) failure: test hwasan x86_64_lam_qemu (failure)
...
[305/310] Generating ../../bin/llvm-readelf
[306/310] Generating ../../bin/llvm-strip
[307/310] Linking CXX executable bin/llvm-nm
[308/310] Linking CXX executable bin/sancov
[309/310] Linking CXX executable bin/llvm-objdump
[309/310] Running the HWAddressSanitizer tests with Intel LAM
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/lit.common.cfg.py:380: warning: %device_rm is not implemented
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 108 of 109 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50..
FAIL: HWAddressSanitizer-x86_64 :: TestCases/Posix/ignore_free_hook.cpp (64 of 108)
******************** TEST 'HWAddressSanitizer-x86_64 :: TestCases/Posix/ignore_free_hook.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang  --driver-mode=g++  -m64  -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -O2 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp -DTEST=basic_hook_works && not env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp    2>&1 | FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -check-prefix=CHECK-BASIC
+ /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions -O2 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -o /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp -DTEST=basic_hook_works
+ not env SSH_CONTROL_SOCKET=/home/b/sanitizer-x86_64-linux-qemu/build/qemu_tmp/ssh-control-socket /home/b/sanitizer-x86_64-linux-qemu/sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/ssh_run.sh /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_x86_64_lam_qemu/projects/compiler-rt/test/hwasan/X86_64/TestCases/Posix/Output/ignore_free_hook.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp -check-prefix=CHECK-BASIC
/home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:45:18: error: CHECK-BASIC: expected string not found in input
 // CHECK-BASIC: Free Hook
                 ^
<stdin>:1:15: note: scanning from here
Free Respected
              ^
<stdin>:6:142: note: possible intended match here
 #2 0x561c3c8dc8ca in basic_hook_works /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:46:13
                                                                                                                                             ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: Free Respected 
check:45'0                   X error: no match found
            2: ==682==ERROR: HWAddressSanitizer: tag-mismatch on address 0x73ddfffe0000 at pc 0x561c3c88f46a 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: WRITE of size 1 at 0x73ddfffe0000 tags: 11/12 (ptr/mem) in thread T0 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4:  #0 0x561c3c88f46a in SigTrap<(__hwasan::ErrorAction)0, (__hwasan::AccessType)1, 0UL> /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan_checks.h:67:3 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:  #1 0x561c3c88f46a in __hwasan_store1 /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/lib/hwasan/hwasan.cpp:589:3 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6:  #2 0x561c3c8dc8ca in basic_hook_works /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/compiler-rt/test/hwasan/TestCases/Posix/ignore_free_hook.cpp:46:13 
check:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
Since AVX10.2, we need to enable 128/256-bit vector by default and check
for 512 feature for 512-bit vector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants