forked from OSchip/llvm-project
20 lines
878 B
Plaintext
20 lines
878 B
Plaintext
# Check that BOLT inserts trap instruction at entry to functions that use AVX-512.
|
|
# Check that AVX-512 instruction is updated correctly when -trap-avx512=0 is passed.
|
|
|
|
RUN: %clang %S/Inputs/avx512.c -o %t -Wl,-q,-znow
|
|
RUN: llvm-bolt %t -trap-avx512=1 -o %t.bolt 2>&1 | FileCheck %s && \
|
|
RUN: llvm-objdump -d --disassemble-symbols=use_avx512 %t.bolt | FileCheck %s --check-prefix=CHECK-DIS
|
|
RUN: llvm-bolt %t -trap-avx512=0 -o %t.bolt && \
|
|
RUN: llvm-objdump -d --disassemble-symbols=use_avx512 %t.bolt | FileCheck %s --check-prefix=CHECK-DIS-NO-TRAP
|
|
|
|
CHECK: BOLT-WARNING: 1 function will trap on entry
|
|
|
|
# Check that we have two ud2 instructions - one per entry.
|
|
CHECK-DIS: use_avx512
|
|
CHECK-DIS-NEXT: ud2
|
|
CHECK-DIS-NEXT: ud2
|
|
|
|
# Check that we generate correct AVX-512
|
|
CHECK-DIS-NO-TRAP: use_avx512
|
|
CHECK-DIS-NO-TRAP: 62 e2 f5 70 2c da vscalefpd
|